From dceca02699e31c99274af549ad77ce9c5cb88d08 Mon Sep 17 00:00:00 2001 From: SirDomin Date: Wed, 6 Apr 2022 09:23:27 +0200 Subject: [PATCH 1/5] [Maintenance] bump node version --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 83798c24..8b3ab50d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: fail-fast: false matrix: php: ["7.4", "8.0"] - node: ["10.x"] + node: ["12.x"] mysql: ["5.7", "8.0"] symfony: ["^4.4", "^5.4"] sylius: ["~1.10.0", "^1.11.0-alpha"] From ca43fc5edae414d2f0d58c266c6d496bf18dd204 Mon Sep 17 00:00:00 2001 From: SirDomin Date: Wed, 6 Apr 2022 09:56:22 +0200 Subject: [PATCH 2/5] [Maintenance] bump sylius version to support 1.11 release --- .github/workflows/build.yml | 7 ++----- composer.json | 2 +- tests/Application/Kernel.php | 8 ++++++++ tests/Behat/Resources/suites.yml | 4 ++-- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8b3ab50d..98f87afa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,14 +19,11 @@ jobs: strategy: fail-fast: false matrix: - php: ["7.4", "8.0"] + php: ["8.0"] node: ["12.x"] mysql: ["5.7", "8.0"] symfony: ["^4.4", "^5.4"] - sylius: ["~1.10.0", "^1.11.0-alpha"] - exclude: - - php: "7.4" - sylius: "^1.11.0-alpha" + sylius: ["~1.10.11", "~1.11.2"] env: APP_ENV: test DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}" diff --git a/composer.json b/composer.json index 1f841ac1..043ee60f 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "require": { "php": "^7.4 || ^8.0", "polishsymfonycommunity/symfony-mocker-container": "^1.0", - "sylius/sylius": "^1.10", + "sylius/sylius": "~1.10.11 || ~1.11.2", "phpseclib/phpseclib": "^2.0", "sylius-labs/doctrine-migrations-extra-bundle": "^0.1.3", "doctrine/doctrine-migrations-bundle": "^3.0" diff --git a/tests/Application/Kernel.php b/tests/Application/Kernel.php index c9e923d0..ab0c493b 100644 --- a/tests/Application/Kernel.php +++ b/tests/Application/Kernel.php @@ -44,6 +44,14 @@ public function getLogDir(): string public function registerBundles(): iterable { $contents = require $this->getProjectDir() . '/config/bundles.php'; + + if (SyliusKernel::MINOR_VERSION > 10) { + $contents = array_merge( + ['Sylius\Calendar\SyliusCalendarBundle' => ['all' => true]], + $contents + ); + } + foreach ($contents as $class => $envs) { if (isset($envs['all']) || isset($envs[$this->environment])) { yield new $class(); diff --git a/tests/Behat/Resources/suites.yml b/tests/Behat/Resources/suites.yml index df27e53e..e8741ff1 100644 --- a/tests/Behat/Resources/suites.yml +++ b/tests/Behat/Resources/suites.yml @@ -102,13 +102,13 @@ default: tags: "@managing_payment_methods && @ui" ui_managing_orders: contexts: - - sylius.behat.context.hook.calendar + - Sylius\Calendar\Tests\Behat\Context\Hook\CalendarContext - sylius.behat.context.hook.doctrine_orm - sylius.behat.context.hook.email_spool - sylius.behat.context.setup.admin_security - sylius.behat.context.setup.admin_user - - sylius.behat.context.setup.calendar + - Sylius\Calendar\Tests\Behat\Context\Setup\CalendarContext - sylius.behat.context.setup.channel - sylius.behat.context.setup.currency - sylius.behat.context.setup.customer From 9b2162101241da42f7af6a6c3a1eaec0777a7e30 Mon Sep 17 00:00:00 2001 From: SirDomin Date: Wed, 6 Apr 2022 12:41:01 +0200 Subject: [PATCH 3/5] [Build] add suites for 1.10 --- .github/workflows/build.yml | 8 +- tests/Behat/Resources/sylius-1.10/suites.yml | 163 +++++++++++++++++++ 2 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 tests/Behat/Resources/sylius-1.10/suites.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 98f87afa..83f2618d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: fail-fast: false matrix: php: ["8.0"] - node: ["12.x"] + node: ["14.x"] mysql: ["5.7", "8.0"] symfony: ["^4.4", "^5.4"] sylius: ["~1.10.11", "~1.11.2"] @@ -114,6 +114,12 @@ jobs: name: Install JS dependencies run: (cd tests/Application && yarn install) + - + name: Prepare configuration for Sylius 1.10 + if: matrix.sylius == '~1.10.11' + run: | + rm tests/Behat/Resources/suites.yml + cp tests/Behat/Resources/sylius-1.10/suites.yml tests/Behat/Resources - name: Prepare test application database run: | diff --git a/tests/Behat/Resources/sylius-1.10/suites.yml b/tests/Behat/Resources/sylius-1.10/suites.yml new file mode 100644 index 00000000..df27e53e --- /dev/null +++ b/tests/Behat/Resources/sylius-1.10/suites.yml @@ -0,0 +1,163 @@ +# This file is part of the Sylius package. +# (c) Paweł Jędrzejewski + +default: + suites: + ui_checkout: + contexts: + - sylius.behat.context.hook.doctrine_orm + - sylius.behat.context.hook.email_spool + + - sylius.behat.context.transform.address + - sylius.behat.context.transform.country + - sylius.behat.context.transform.channel + - sylius.behat.context.transform.currency + - sylius.behat.context.transform.customer + - sylius.behat.context.transform.lexical + - sylius.behat.context.transform.locale + - sylius.behat.context.transform.order + - sylius.behat.context.transform.payment + - sylius.behat.context.transform.product + - sylius.behat.context.transform.product_option + - sylius.behat.context.transform.province + - sylius.behat.context.transform.shared_storage + - sylius.behat.context.transform.shipping_category + - sylius.behat.context.transform.shipping_method + - sylius.behat.context.transform.tax_category + - sylius.behat.context.transform.user + - sylius.behat.context.transform.zone + + - sylius.behat.context.setup.address + - sylius.behat.context.setup.admin_user + - sylius.behat.context.setup.channel + - sylius.behat.context.setup.currency + - sylius.behat.context.setup.customer + - sylius.behat.context.setup.exchange_rate + - sylius.behat.context.setup.geographical + - sylius.behat.context.setup.locale + - sylius.behat.context.setup.payment + - sylius.behat.context.setup.product + - sylius.behat.context.setup.promotion + - sylius.behat.context.setup.shop_security + - sylius.behat.context.setup.shipping + - sylius.behat.context.setup.shipping_category + - sylius.behat.context.setup.taxation + - sylius.behat.context.setup.user + - sylius.behat.context.setup.zone + - Tests\Sylius\PayPalPlugin\Behat\Context\Setup\PaymentPayPalContext + + - sylius.behat.context.ui.admin.managing_orders + - sylius.behat.context.ui.channel + - sylius.behat.context.ui.email + - sylius.behat.context.ui.shop.address_book + - sylius.behat.context.ui.shop.cart + - sylius.behat.context.ui.shop.checkout + - sylius.behat.context.ui.shop.checkout.addressing + - sylius.behat.context.ui.shop.checkout.complete + - sylius.behat.context.ui.shop.checkout.payment + - sylius.behat.context.ui.shop.checkout.shipping + - sylius.behat.context.ui.shop.checkout.thank_you + - sylius.behat.context.ui.shop.checkout.registration_after_checkout + - sylius.behat.context.ui.shop.currency + - sylius.behat.context.ui.shop.homepage + - sylius.behat.context.ui.shop.locale + + filters: + tags: "@checkout && @ui" + ui_managing_payment_methods: + contexts: + - sylius.behat.context.hook.doctrine_orm + + - sylius.behat.context.transform.address + - sylius.behat.context.transform.channel + - sylius.behat.context.transform.country + - sylius.behat.context.transform.customer + - sylius.behat.context.transform.order + - sylius.behat.context.transform.payment + - sylius.behat.context.transform.product + - sylius.behat.context.transform.shared_storage + - sylius.behat.context.transform.shipping_method + - sylius.behat.context.transform.zone + - sylius.behat.context.transform.lexical + + - sylius.behat.context.setup.admin_security + - sylius.behat.context.setup.channel + - sylius.behat.context.setup.customer + - sylius.behat.context.setup.geographical + - sylius.behat.context.setup.order + - sylius.behat.context.setup.payment + - sylius.behat.context.setup.product + - sylius.behat.context.setup.shipping + - sylius.behat.context.setup.zone + + - Tests\Sylius\PayPalPlugin\Behat\Context\Setup\PaymentPayPalContext + + - sylius.behat.context.ui.admin.managing_payment_methods + - sylius.behat.context.ui.channel + - sylius.behat.context.ui.email + - sylius.behat.context.ui.shop.cart + + - Tests\Sylius\PayPalPlugin\Behat\Context\Admin\ManagingPaymentMethodsContext + filters: + tags: "@managing_payment_methods && @ui" + ui_managing_orders: + contexts: + - sylius.behat.context.hook.calendar + - sylius.behat.context.hook.doctrine_orm + - sylius.behat.context.hook.email_spool + + - sylius.behat.context.setup.admin_security + - sylius.behat.context.setup.admin_user + - sylius.behat.context.setup.calendar + - sylius.behat.context.setup.channel + - sylius.behat.context.setup.currency + - sylius.behat.context.setup.customer + - sylius.behat.context.setup.geographical + - sylius.behat.context.setup.locale + - sylius.behat.context.setup.order + - sylius.behat.context.setup.payment + - sylius.behat.context.setup.product + - sylius.behat.context.setup.product_taxon + - sylius.behat.context.setup.promotion + - sylius.behat.context.setup.shipping + - sylius.behat.context.setup.shop_security + - sylius.behat.context.setup.taxation + - sylius.behat.context.setup.taxonomy + - sylius.behat.context.setup.user + - sylius.behat.context.setup.zone + + - Tests\Sylius\PayPalPlugin\Behat\Context\Setup\PaymentPayPalContext + + - sylius.behat.context.transform.address + - sylius.behat.context.transform.channel + - sylius.behat.context.transform.country + - sylius.behat.context.transform.currency + - sylius.behat.context.transform.customer + - sylius.behat.context.transform.lexical + - sylius.behat.context.transform.locale + - sylius.behat.context.transform.order + - sylius.behat.context.transform.payment + - sylius.behat.context.transform.product + - sylius.behat.context.transform.product_variant + - sylius.behat.context.transform.promotion + - sylius.behat.context.transform.shipping_method + - sylius.behat.context.transform.tax_category + - sylius.behat.context.transform.taxon + - sylius.behat.context.transform.zone + + - sylius.behat.context.transform.shared_storage + + - sylius.behat.context.ui.admin.managing_orders + - sylius.behat.context.ui.admin.notification + - sylius.behat.context.ui.channel + - sylius.behat.context.ui.email + - sylius.behat.context.ui.shop.cart + - sylius.behat.context.ui.shop.checkout + - sylius.behat.context.ui.shop.checkout.addressing + - sylius.behat.context.ui.shop.checkout.complete + - sylius.behat.context.ui.shop.currency + + - Tests\Sylius\PayPalPlugin\Behat\Context\Admin\ManagingOrdersContext + + filters: + tags: "@managing_orders && @ui" From b9a80eb7601947c0e773933c7b5baf0f918ba7a5 Mon Sep 17 00:00:00 2001 From: SirDomin Date: Wed, 13 Apr 2022 09:58:02 +0200 Subject: [PATCH 4/5] [GithubActions] support sylius 1.10 with php 7.4 --- .github/workflows/build.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 83f2618d..e6aa29df 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,11 +19,14 @@ jobs: strategy: fail-fast: false matrix: - php: ["8.0"] + php: ["7.4", "8.0"] node: ["14.x"] mysql: ["5.7", "8.0"] symfony: ["^4.4", "^5.4"] - sylius: ["~1.10.11", "~1.11.2"] + sylius: ["1.10.*", "1.11.*"] + exclude: + - php: "7.4" + sylius: "1.11.*" env: APP_ENV: test DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}" @@ -116,7 +119,7 @@ jobs: - name: Prepare configuration for Sylius 1.10 - if: matrix.sylius == '~1.10.11' + if: matrix.sylius == '1.10.*' run: | rm tests/Behat/Resources/suites.yml cp tests/Behat/Resources/sylius-1.10/suites.yml tests/Behat/Resources From 30ae735f6c1a0060feb32bd8a97bdc172e6c640e Mon Sep 17 00:00:00 2001 From: SirDomin Date: Wed, 13 Apr 2022 11:43:51 +0200 Subject: [PATCH 5/5] [Maintenance] rebase to 1.4, fix composer --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 043ee60f..a9a86fd1 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "require": { "php": "^7.4 || ^8.0", "polishsymfonycommunity/symfony-mocker-container": "^1.0", - "sylius/sylius": "~1.10.11 || ~1.11.2", + "sylius/sylius": "~1.10.0 || ~1.11.0", "phpseclib/phpseclib": "^2.0", "sylius-labs/doctrine-migrations-extra-bundle": "^0.1.3", "doctrine/doctrine-migrations-bundle": "^3.0"