From 67b0b9ffe410c645a70bb9fdf9acda372c79f842 Mon Sep 17 00:00:00 2001 From: Lorenzo Ruozzi Date: Mon, 3 Jun 2024 10:35:45 +0200 Subject: [PATCH] Support for Sylius 1.13 --- .github/workflows/build.yaml | 2 +- behat.yml.dist | 45 ++++++++++++++++------------ composer.json | 15 ++++++---- tests/Application/config/bundles.php | 7 ++++- 4 files changed, 42 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 713f4ae..f111fa8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['8.0'] + php-versions: ['8.2', '8.3'] steps: - name: Checkout uses: actions/checkout@v2 diff --git a/behat.yml.dist b/behat.yml.dist index 0d248a3..b97d6ac 100644 --- a/behat.yml.dist +++ b/behat.yml.dist @@ -5,8 +5,15 @@ default: gherkin: filters: tags: "~@todo" + formatters: + pretty: + verbose: true + paths: false + snippets: false + extensions: DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~ + Robertfausk\Behat\PantherExtension: ~ FriendsOfBehat\MinkDebugExtension: directory: etc/build @@ -17,32 +24,30 @@ default: files_path: "%paths.base%/vendor/sylius/sylius/src/Sylius/Behat/Resources/fixtures/" base_url: "https://127.0.0.1:8080/" default_session: symfony - javascript_session: chrome_headless + javascript_session: chromedriver sessions: symfony: symfony: ~ - chrome_headless: + chromedriver: chrome: api_url: http://127.0.0.1:9222 validate_certificate: false - chrome: - selenium2: - browser: chrome - capabilities: - browserName: chrome - browser: chrome - version: "" - marionette: null # https://github.com/Behat/MinkExtension/pull/311 - chrome: - switches: - - "start-fullscreen" - - "start-maximized" - - "no-sandbox" - extra_capabilities: + chrome_headless_second_session: + chrome: + api_url: http://127.0.0.1:9222 + validate_certificate: false + panther: + panther: + manager_options: + connection_timeout_in_ms: 5000 + request_timeout_in_ms: 120000 + chromedriver_arguments: + - --log-path=etc/build/chromedriver.log + - --verbose + capabilities: + acceptSslCerts: true + acceptInsecureCerts: true unexpectedAlertBehaviour: accept - firefox: - selenium2: - browser: firefox show_auto: false FriendsOfBehat\SymfonyExtension: @@ -55,3 +60,5 @@ default: FriendsOfBehat\SuiteSettingsExtension: paths: - "features" + + SyliusLabs\SuiteTagsExtension: ~ diff --git a/composer.json b/composer.json index e59371f..a3cdb36 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ ], "license": "MIT", "require": { - "php": ">=8.0", + "php": ">=8.1", "psr/event-dispatcher": "^1.0", "setono/tag-bag-bundle": "^3.0", "sylius/resource-bundle": "^1.6", @@ -19,16 +19,19 @@ "thecodingmachine/safe": "^1.0" }, "require-dev": { - "phpspec/phpspec": "^6.3", - "phpunit/phpunit": "^9.5", + "dbrekelmans/bdi": "^1.1", + "phpspec/phpspec": "^7.0", + "phpunit/phpunit": "^9.6 || ^10.5", "roave/security-advisories": "dev-latest", + "robertfausk/behat-panther-extension": "^1.1", "setono/code-quality-pack": "^2.0", "setono/sylius-behat-pack": "^0.2", "setono/sylius-tag-bag-plugin": "^1.3", + "sylius-labs/suite-tags-extension": "^0.2", "sylius/mailer-bundle": "^2.0", - "sylius/sylius": "~1.12.0", - "symfony/debug-bundle": "^5.1", - "symfony/dotenv": "^5.2", + "sylius/sylius": "~1.12.0 || ~1.13.1", + "symfony/debug-bundle": "^5.1 || ^6.0", + "symfony/dotenv": "^5.4 || ^6.0", "symfony/intl": "^5.0 || ^6.0", "symfony/web-profiler-bundle": "^5.0 || ^6.0" }, diff --git a/tests/Application/config/bundles.php b/tests/Application/config/bundles.php index 4b84498..b7af337 100644 --- a/tests/Application/config/bundles.php +++ b/tests/Application/config/bundles.php @@ -1,6 +1,6 @@ ['all' => true], Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], @@ -61,3 +61,8 @@ Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true], League\FlysystemBundle\FlysystemBundle::class => ['all' => true], ]; +if (class_exists(Sylius\Abstraction\StateMachine\SyliusStateMachineAbstractionBundle::class)) { + $bundles[Sylius\Abstraction\StateMachine\SyliusStateMachineAbstractionBundle::class] = ['all' => true]; +} + +return $bundles;