From df041766686cda0201540a9faf364ec8afe4f6ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wojda=C5=82owicz?= Date: Mon, 26 Feb 2024 14:16:43 +0100 Subject: [PATCH 01/19] Sylius 1.13 - Update composer.json --- composer.json | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/composer.json b/composer.json index 4008d75a..c8dc3c49 100644 --- a/composer.json +++ b/composer.json @@ -19,41 +19,41 @@ } ], "require": { - "php": "^8.0", + "php": "^8.1", "knplabs/knp-snappy-bundle": "^1.7", "myclabs/php-enum": "^1.7", "php-http/message-factory": "^1.1", - "sylius/resource-bundle": "^1.6", - "sylius/sylius": "~1.11.4 || ~1.12.0", - "symfony/messenger": "^5.4 || ^6.0" + "sylius/resource-bundle": "^1.9", + "sylius/sylius": "~1.12.0 || 1.13.x-dev", + "symfony/messenger": "^5.4.21 || ^6.4" }, "require-dev": { - "behat/behat": "^3.6", + "behat/behat": "^3.6.1", "behat/mink-selenium2-driver": "^1.4", "dmore/behat-chrome-extension": "^1.3", "dmore/chrome-mink-driver": "^2.7", "friends-of-behat/exclude-specifications-extension": "^0.2 || ^0.3", "friends-of-behat/mink": "^1.8", - "friends-of-behat/mink-browserkit-driver": "^1.3", + "friends-of-behat/mink-browserkit-driver": "^1.4", "friends-of-behat/mink-debug-extension": "^2.0", - "friends-of-behat/mink-extension": "^2.3", + "friends-of-behat/mink-extension": "^2.4", "friends-of-behat/page-object-extension": "^0.3", "friends-of-behat/suite-settings-extension": "^1.0", "friends-of-behat/symfony-extension": "^2.1", "friends-of-behat/variadic-extension": "^1.3", - "matthiasnoback/symfony-config-test": "^4.0", - "matthiasnoback/symfony-dependency-injection-test": "^4.1", - "phpspec/phpspec": "^7.0", - "phpstan/phpstan": "1.5.4", - "phpstan/phpstan-webmozart-assert": "1.1.2", + "matthiasnoback/symfony-config-test": "^4.2", + "matthiasnoback/symfony-dependency-injection-test": "^4.2", + "phpspec/phpspec": "^7.2", + "phpstan/phpstan": "^1.6", + "phpstan/phpstan-webmozart-assert": "^1.1", "phpunit/phpunit": "^9.5", "polishsymfonycommunity/symfony-mocker-container": "^1.0", - "sylius-labs/coding-standard": "~4.3.0", - "symfony/browser-kit": "^5.4 || ^6.0", - "symfony/debug-bundle": "^5.4 || ^6.0", - "symfony/dotenv": "^5.4 || ^6.0", + "sylius-labs/coding-standard": "^4.2", + "symfony/browser-kit": "^5.4.21 || ^6.4", + "symfony/debug-bundle": "^5.4.21 || ^6.4", + "symfony/dotenv": "^5.4.21 || ^6.4", "symfony/intl": "^5.4 || ^6.0", - "symfony/web-profiler-bundle": "^5.4 || ^6.0", + "symfony/web-profiler-bundle": "^5.4.21 || ^6.4", "symfony/webpack-encore-bundle": "^1.15" }, "conflict": { From 368352e4878b565f5ef912bdc054f480d4f0a29d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wojda=C5=82owicz?= Date: Mon, 26 Feb 2024 14:17:03 +0100 Subject: [PATCH 02/19] Sylius 1.13 - Add workflow configuration --- src/Resources/config/app/config.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/Resources/config/app/config.yml b/src/Resources/config/app/config.yml index c92be548..b266bf48 100644 --- a/src/Resources/config/app/config.yml +++ b/src/Resources/config/app/config.yml @@ -59,6 +59,23 @@ framework: default_middleware: allow_no_handlers sylius_refund_plugin.command_bus: *command_bus sylius_refund_plugin.event_bus: *event_bus + workflows: + workflows: + sylius_refund_refund_payment: + type: state_machine + marking_store: + type: method + property: state + supports: + - Sylius\RefundPlugin\Entity\RefundPayment + initial_marking: new + places: + - !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_NEW + - !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_COMPLETED + transitions: + complete: + from: !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_NEW + to: !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_COMPLETED winzou_state_machine: sylius_refund_refund_payment: From 6def59ff8234513e6d11aa3104e573833b844ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wojda=C5=82owicz?= Date: Mon, 26 Feb 2024 14:20:13 +0100 Subject: [PATCH 03/19] Sylius 1.13 - Remove deprecation --- tests/Behat/Resources/services.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Behat/Resources/services.xml b/tests/Behat/Resources/services.xml index 6be8f913..bfad457e 100644 --- a/tests/Behat/Resources/services.xml +++ b/tests/Behat/Resources/services.xml @@ -85,7 +85,7 @@ - + From 1f0cf1d7ae77c446c0fc217b1a33f99fc16f1688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wojda=C5=82owicz?= Date: Mon, 26 Feb 2024 14:20:36 +0100 Subject: [PATCH 04/19] Sylius 1.13 - Update gh actions config --- .github/workflows/build.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3ec73e0e..50921d41 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,9 +23,9 @@ jobs: strategy: fail-fast: false matrix: - php: ["8.0", "8.1"] - symfony: ["^5.4", "^6.0"] - sylius: ["~1.11.4", "~1.12.0"] + php: ["8.1", "8.2", "8.3"] + symfony: ["^5.4.21", "^6.4"] + sylius: ["~1.12.0", "1.13.x-dev",] node: ["16.x"] mysql: ["5.7", "8.0"] wkhtmltopdf: ["0.12.6-1"] @@ -47,9 +47,6 @@ jobs: wkhtmltopdf: false exclude: - - - php: "8.0" - symfony: "^6.0" - symfony: "^6.0" sylius: "~1.11.4" From 338cbe2679b2658f442c1b9cb6f5dbcf37011f63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wojda=C5=82owicz?= Date: Mon, 26 Feb 2024 14:59:30 +0100 Subject: [PATCH 05/19] Sylius 1.13 - Update bundles.php in test application --- tests/Application/config/bundles.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/Application/config/bundles.php b/tests/Application/config/bundles.php index 143e9c41..08d24d53 100644 --- a/tests/Application/config/bundles.php +++ b/tests/Application/config/bundles.php @@ -67,4 +67,8 @@ $bundles[Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class] = ['all' => true]; } +if (SyliusKernel::MINOR_VERSION === 13) { + $bundles[Sylius\Abstraction\StateMachine\SyliusStateMachineAbstractionBundle::class] = ['all' => true]; +} + return $bundles; From ec10dee588ed09c88b91a9bb21b3a024c87fee86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wojda=C5=82owicz?= Date: Mon, 26 Feb 2024 15:04:19 +0100 Subject: [PATCH 06/19] Sylius 1.13 - Update bundles.php in test application --- tests/Application/config/bundles.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Application/config/bundles.php b/tests/Application/config/bundles.php index 08d24d53..7c53154e 100644 --- a/tests/Application/config/bundles.php +++ b/tests/Application/config/bundles.php @@ -67,7 +67,7 @@ $bundles[Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class] = ['all' => true]; } -if (SyliusKernel::MINOR_VERSION === 13) { +if (SyliusKernel::MINOR_VERSION == 13) { $bundles[Sylius\Abstraction\StateMachine\SyliusStateMachineAbstractionBundle::class] = ['all' => true]; } From a4318d6301d5d9781b5ef11d8c0c5c0ae361254b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wojda=C5=82owicz?= Date: Tue, 27 Feb 2024 08:53:26 +0100 Subject: [PATCH 07/19] Sylius 1.13 - add workflow configuration only in 1.13, add workflow to the gh actions --- .github/workflows/build.yml | 7 ++++-- src/Resources/config/app/config.yml | 17 -------------- .../Application/config/packages/_sylius.yaml | 6 +++++ .../config/sylius/1.13/workflow.yaml | 22 +++++++++++++++++++ 4 files changed, 33 insertions(+), 19 deletions(-) create mode 100644 tests/Application/config/sylius/1.13/workflow.yaml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 50921d41..4ea866b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,6 +29,8 @@ jobs: node: ["16.x"] mysql: ["5.7", "8.0"] wkhtmltopdf: ["0.12.6-1"] + state_machine_adapter: [ "winzou_state_machine", "symfony_workflow" ] + include: - @@ -48,12 +50,13 @@ jobs: exclude: - - symfony: "^6.0" - sylius: "~1.11.4" + sylius: "~1.12.0" + state_machine_adapter: "symfony_workflow" env: APP_ENV: test DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}" + TEST_SYLIUS_STATE_MACHINE_ADAPTER: "${{ matrix.state_machine_adapter }}" steps: - diff --git a/src/Resources/config/app/config.yml b/src/Resources/config/app/config.yml index b266bf48..c92be548 100644 --- a/src/Resources/config/app/config.yml +++ b/src/Resources/config/app/config.yml @@ -59,23 +59,6 @@ framework: default_middleware: allow_no_handlers sylius_refund_plugin.command_bus: *command_bus sylius_refund_plugin.event_bus: *event_bus - workflows: - workflows: - sylius_refund_refund_payment: - type: state_machine - marking_store: - type: method - property: state - supports: - - Sylius\RefundPlugin\Entity\RefundPayment - initial_marking: new - places: - - !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_NEW - - !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_COMPLETED - transitions: - complete: - from: !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_NEW - to: !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_COMPLETED winzou_state_machine: sylius_refund_refund_payment: diff --git a/tests/Application/config/packages/_sylius.yaml b/tests/Application/config/packages/_sylius.yaml index 7532b01a..2e961aac 100644 --- a/tests/Application/config/packages/_sylius.yaml +++ b/tests/Application/config/packages/_sylius.yaml @@ -9,7 +9,13 @@ imports: parameters: sylius_core.public_dir: '%kernel.project_dir%/public' + test_default_state_machine_adapter: 'symfony_workflow' + test_sylius_state_machine_adapter: '%env(string:default:test_default_state_machine_adapter:TEST_SYLIUS_STATE_MACHINE_ADAPTER)%' sylius_shop: product_grid: include_all_descendants: true + +sylius_state_machine_abstraction: + graphs_to_adapters_mapping: + sylius_refund_refund_payment: '%test_sylius_state_machine_adapter%' diff --git a/tests/Application/config/sylius/1.13/workflow.yaml b/tests/Application/config/sylius/1.13/workflow.yaml new file mode 100644 index 00000000..af6603f8 --- /dev/null +++ b/tests/Application/config/sylius/1.13/workflow.yaml @@ -0,0 +1,22 @@ +framework: + workflows: + workflows: + sylius_refund_refund_payment: + type: state_machine + marking_store: + type: method + property: state + supports: + - Sylius\RefundPlugin\Entity\RefundPayment + initial_marking: new + places: + - !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_NEW + - !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_COMPLETED + transitions: + complete: + from: !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_NEW + to: !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_COMPLETED + +sylius_state_machine_abstraction: + graphs_to_adapters_mapping: + sylius_refund_refund_payment: symfony_workflow From e6b3dc04c2cbc0a49636e9fc9cbe741c5875eb6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wojda=C5=82owicz?= Date: Tue, 27 Feb 2024 09:05:22 +0100 Subject: [PATCH 08/19] Sylius 1.13 - add mailer configuration to the 1.13 version --- .../config/sylius/1.12/packages/test/mailer.yaml | 2 ++ tests/Application/config/sylius/1.13/mailer.yaml | 3 +++ tests/Application/config/sylius/1.13/test/mailer.yaml | 7 +++++++ .../Application/config/sylius/1.13/test_cached/mailer.yaml | 2 ++ 4 files changed, 14 insertions(+) create mode 100644 tests/Application/config/sylius/1.13/mailer.yaml create mode 100644 tests/Application/config/sylius/1.13/test/mailer.yaml create mode 100644 tests/Application/config/sylius/1.13/test_cached/mailer.yaml diff --git a/tests/Application/config/sylius/1.12/packages/test/mailer.yaml b/tests/Application/config/sylius/1.12/packages/test/mailer.yaml index 52610d69..092eb288 100644 --- a/tests/Application/config/sylius/1.12/packages/test/mailer.yaml +++ b/tests/Application/config/sylius/1.12/packages/test/mailer.yaml @@ -1,4 +1,6 @@ framework: + mailer: + dsn: 'null://null' cache: pools: test.mailer_pool: diff --git a/tests/Application/config/sylius/1.13/mailer.yaml b/tests/Application/config/sylius/1.13/mailer.yaml new file mode 100644 index 00000000..56a650d8 --- /dev/null +++ b/tests/Application/config/sylius/1.13/mailer.yaml @@ -0,0 +1,3 @@ +framework: + mailer: + dsn: '%env(MAILER_DSN)%' diff --git a/tests/Application/config/sylius/1.13/test/mailer.yaml b/tests/Application/config/sylius/1.13/test/mailer.yaml new file mode 100644 index 00000000..092eb288 --- /dev/null +++ b/tests/Application/config/sylius/1.13/test/mailer.yaml @@ -0,0 +1,7 @@ +framework: + mailer: + dsn: 'null://null' + cache: + pools: + test.mailer_pool: + adapter: cache.adapter.filesystem diff --git a/tests/Application/config/sylius/1.13/test_cached/mailer.yaml b/tests/Application/config/sylius/1.13/test_cached/mailer.yaml new file mode 100644 index 00000000..16f3170a --- /dev/null +++ b/tests/Application/config/sylius/1.13/test_cached/mailer.yaml @@ -0,0 +1,2 @@ +imports: + - { resource: "../test/mailer.yaml" } From 68d789703b5aec077009e60d0955201f081bda6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wojda=C5=82owicz?= Date: Tue, 27 Feb 2024 09:11:44 +0100 Subject: [PATCH 09/19] Sylius 1.13 - add mailer configuration in the global config of test app --- .../config/{sylius/1.12 => }/packages/mailer.yaml | 0 .../config/{sylius/1.12 => }/packages/test/mailer.yaml | 0 .../{sylius/1.12 => }/packages/test_cached/mailer.yaml | 0 .../config/sylius/1.11/packages/dev/swiftmailer.yaml | 2 -- .../config/sylius/1.11/packages/staging/swiftmailer.yaml | 2 -- .../config/sylius/1.11/packages/swiftmailer.yaml | 2 -- .../config/sylius/1.11/packages/test/swiftmailer.yaml | 6 ------ .../sylius/1.11/packages/test_cached/swiftmailer.yaml | 2 -- tests/Application/config/sylius/1.13/mailer.yaml | 3 --- tests/Application/config/sylius/1.13/test/mailer.yaml | 7 ------- .../Application/config/sylius/1.13/test_cached/mailer.yaml | 2 -- 11 files changed, 26 deletions(-) rename tests/Application/config/{sylius/1.12 => }/packages/mailer.yaml (100%) rename tests/Application/config/{sylius/1.12 => }/packages/test/mailer.yaml (100%) rename tests/Application/config/{sylius/1.12 => }/packages/test_cached/mailer.yaml (100%) delete mode 100644 tests/Application/config/sylius/1.11/packages/dev/swiftmailer.yaml delete mode 100644 tests/Application/config/sylius/1.11/packages/staging/swiftmailer.yaml delete mode 100644 tests/Application/config/sylius/1.11/packages/swiftmailer.yaml delete mode 100644 tests/Application/config/sylius/1.11/packages/test/swiftmailer.yaml delete mode 100644 tests/Application/config/sylius/1.11/packages/test_cached/swiftmailer.yaml delete mode 100644 tests/Application/config/sylius/1.13/mailer.yaml delete mode 100644 tests/Application/config/sylius/1.13/test/mailer.yaml delete mode 100644 tests/Application/config/sylius/1.13/test_cached/mailer.yaml diff --git a/tests/Application/config/sylius/1.12/packages/mailer.yaml b/tests/Application/config/packages/mailer.yaml similarity index 100% rename from tests/Application/config/sylius/1.12/packages/mailer.yaml rename to tests/Application/config/packages/mailer.yaml diff --git a/tests/Application/config/sylius/1.12/packages/test/mailer.yaml b/tests/Application/config/packages/test/mailer.yaml similarity index 100% rename from tests/Application/config/sylius/1.12/packages/test/mailer.yaml rename to tests/Application/config/packages/test/mailer.yaml diff --git a/tests/Application/config/sylius/1.12/packages/test_cached/mailer.yaml b/tests/Application/config/packages/test_cached/mailer.yaml similarity index 100% rename from tests/Application/config/sylius/1.12/packages/test_cached/mailer.yaml rename to tests/Application/config/packages/test_cached/mailer.yaml diff --git a/tests/Application/config/sylius/1.11/packages/dev/swiftmailer.yaml b/tests/Application/config/sylius/1.11/packages/dev/swiftmailer.yaml deleted file mode 100644 index f4380780..00000000 --- a/tests/Application/config/sylius/1.11/packages/dev/swiftmailer.yaml +++ /dev/null @@ -1,2 +0,0 @@ -swiftmailer: - disable_delivery: true diff --git a/tests/Application/config/sylius/1.11/packages/staging/swiftmailer.yaml b/tests/Application/config/sylius/1.11/packages/staging/swiftmailer.yaml deleted file mode 100644 index 98d6b73b..00000000 --- a/tests/Application/config/sylius/1.11/packages/staging/swiftmailer.yaml +++ /dev/null @@ -1,2 +0,0 @@ -imports: - - { resource: "../dev/mailer.yaml" } diff --git a/tests/Application/config/sylius/1.11/packages/swiftmailer.yaml b/tests/Application/config/sylius/1.11/packages/swiftmailer.yaml deleted file mode 100644 index 3bab0d32..00000000 --- a/tests/Application/config/sylius/1.11/packages/swiftmailer.yaml +++ /dev/null @@ -1,2 +0,0 @@ -swiftmailer: - url: '%env(MAILER_URL)%' diff --git a/tests/Application/config/sylius/1.11/packages/test/swiftmailer.yaml b/tests/Application/config/sylius/1.11/packages/test/swiftmailer.yaml deleted file mode 100644 index c438f4b2..00000000 --- a/tests/Application/config/sylius/1.11/packages/test/swiftmailer.yaml +++ /dev/null @@ -1,6 +0,0 @@ -swiftmailer: - disable_delivery: true - logging: true - spool: - type: file - path: "%kernel.cache_dir%/spool" diff --git a/tests/Application/config/sylius/1.11/packages/test_cached/swiftmailer.yaml b/tests/Application/config/sylius/1.11/packages/test_cached/swiftmailer.yaml deleted file mode 100644 index 16f3170a..00000000 --- a/tests/Application/config/sylius/1.11/packages/test_cached/swiftmailer.yaml +++ /dev/null @@ -1,2 +0,0 @@ -imports: - - { resource: "../test/mailer.yaml" } diff --git a/tests/Application/config/sylius/1.13/mailer.yaml b/tests/Application/config/sylius/1.13/mailer.yaml deleted file mode 100644 index 56a650d8..00000000 --- a/tests/Application/config/sylius/1.13/mailer.yaml +++ /dev/null @@ -1,3 +0,0 @@ -framework: - mailer: - dsn: '%env(MAILER_DSN)%' diff --git a/tests/Application/config/sylius/1.13/test/mailer.yaml b/tests/Application/config/sylius/1.13/test/mailer.yaml deleted file mode 100644 index 092eb288..00000000 --- a/tests/Application/config/sylius/1.13/test/mailer.yaml +++ /dev/null @@ -1,7 +0,0 @@ -framework: - mailer: - dsn: 'null://null' - cache: - pools: - test.mailer_pool: - adapter: cache.adapter.filesystem diff --git a/tests/Application/config/sylius/1.13/test_cached/mailer.yaml b/tests/Application/config/sylius/1.13/test_cached/mailer.yaml deleted file mode 100644 index 16f3170a..00000000 --- a/tests/Application/config/sylius/1.13/test_cached/mailer.yaml +++ /dev/null @@ -1,2 +0,0 @@ -imports: - - { resource: "../test/mailer.yaml" } From e9de6297e0a40f1ea7d0c1aa2eaf6d90e504adac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wojda=C5=82owicz?= Date: Tue, 27 Feb 2024 09:14:54 +0100 Subject: [PATCH 10/19] Sylius 1.13 - adapt state machine configuration per version --- tests/Application/config/packages/_sylius.yaml | 6 ------ tests/Application/config/sylius/1.12/_sylius.yaml | 8 ++++++++ tests/Application/config/sylius/1.13/_sylius.yaml | 8 ++++++++ 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 tests/Application/config/sylius/1.12/_sylius.yaml create mode 100644 tests/Application/config/sylius/1.13/_sylius.yaml diff --git a/tests/Application/config/packages/_sylius.yaml b/tests/Application/config/packages/_sylius.yaml index 2e961aac..7532b01a 100644 --- a/tests/Application/config/packages/_sylius.yaml +++ b/tests/Application/config/packages/_sylius.yaml @@ -9,13 +9,7 @@ imports: parameters: sylius_core.public_dir: '%kernel.project_dir%/public' - test_default_state_machine_adapter: 'symfony_workflow' - test_sylius_state_machine_adapter: '%env(string:default:test_default_state_machine_adapter:TEST_SYLIUS_STATE_MACHINE_ADAPTER)%' sylius_shop: product_grid: include_all_descendants: true - -sylius_state_machine_abstraction: - graphs_to_adapters_mapping: - sylius_refund_refund_payment: '%test_sylius_state_machine_adapter%' diff --git a/tests/Application/config/sylius/1.12/_sylius.yaml b/tests/Application/config/sylius/1.12/_sylius.yaml new file mode 100644 index 00000000..a46c5b90 --- /dev/null +++ b/tests/Application/config/sylius/1.12/_sylius.yaml @@ -0,0 +1,8 @@ +parameters: + test_default_state_machine_adapter: 'winzou_state_machine' + test_sylius_state_machine_adapter: '%env(string:default:test_default_state_machine_adapter:TEST_SYLIUS_STATE_MACHINE_ADAPTER)%' + + +sylius_state_machine_abstraction: + graphs_to_adapters_mapping: + sylius_refund_refund_payment: 'winzou_state_machine' diff --git a/tests/Application/config/sylius/1.13/_sylius.yaml b/tests/Application/config/sylius/1.13/_sylius.yaml new file mode 100644 index 00000000..1e5c4392 --- /dev/null +++ b/tests/Application/config/sylius/1.13/_sylius.yaml @@ -0,0 +1,8 @@ +parameters: + test_default_state_machine_adapter: 'symfony_workflow' + test_sylius_state_machine_adapter: '%env(string:default:test_default_state_machine_adapter:TEST_SYLIUS_STATE_MACHINE_ADAPTER)%' + + +sylius_state_machine_abstraction: + graphs_to_adapters_mapping: + sylius_refund_refund_payment: '%test_sylius_state_machine_adapter%' From 9d43c5b0fb236e6c354ab7a81fe72944fabedaee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wojda=C5=82owicz?= Date: Tue, 27 Feb 2024 09:26:12 +0100 Subject: [PATCH 11/19] Sylius 1.13 - fix composer.json problem --- .github/workflows/build.yml | 8 -------- composer.json | 2 +- tests/Application/config/sylius/1.12/_sylius.yaml | 5 ----- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ea866b5..1978fd8a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,14 +40,6 @@ jobs: node: "16.x" mysql: "8.0" wkhtmltopdf: false - - - php: "8.1" - symfony: "^5.4" - sylius: "~1.11.2" - node: "14.x" - mysql: "8.0" - wkhtmltopdf: false - exclude: - sylius: "~1.12.0" diff --git a/composer.json b/composer.json index c8dc3c49..55351f76 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "myclabs/php-enum": "^1.7", "php-http/message-factory": "^1.1", "sylius/resource-bundle": "^1.9", - "sylius/sylius": "~1.12.0 || 1.13.x-dev", + "sylius/sylius": "~1.12.0 || ~1.13.x-dev", "symfony/messenger": "^5.4.21 || ^6.4" }, "require-dev": { diff --git a/tests/Application/config/sylius/1.12/_sylius.yaml b/tests/Application/config/sylius/1.12/_sylius.yaml index a46c5b90..faeb14bb 100644 --- a/tests/Application/config/sylius/1.12/_sylius.yaml +++ b/tests/Application/config/sylius/1.12/_sylius.yaml @@ -1,8 +1,3 @@ parameters: test_default_state_machine_adapter: 'winzou_state_machine' test_sylius_state_machine_adapter: '%env(string:default:test_default_state_machine_adapter:TEST_SYLIUS_STATE_MACHINE_ADAPTER)%' - - -sylius_state_machine_abstraction: - graphs_to_adapters_mapping: - sylius_refund_refund_payment: 'winzou_state_machine' From 1e379fc4fdb822558b77015674e2b700398aee03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wojda=C5=82owicz?= Date: Tue, 27 Feb 2024 10:20:51 +0100 Subject: [PATCH 12/19] Sylius 1.13 - try to fix problem with not existing service --- tests/Behat/Resources/services.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Behat/Resources/services.xml b/tests/Behat/Resources/services.xml index bfad457e..6be8f913 100644 --- a/tests/Behat/Resources/services.xml +++ b/tests/Behat/Resources/services.xml @@ -85,7 +85,7 @@ - + From bcccd2184cba3055e7b969a9466b7fa110bb4bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wojda=C5=82owicz?= Date: Tue, 27 Feb 2024 10:27:20 +0100 Subject: [PATCH 13/19] Sylius 1.13 - unlock sylius 13 version in gh actions --- .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 1978fd8a..abe5d632 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: matrix: php: ["8.1", "8.2", "8.3"] symfony: ["^5.4.21", "^6.4"] - sylius: ["~1.12.0", "1.13.x-dev",] + sylius: ["~1.12.0", "~1.13.x-dev",] node: ["16.x"] mysql: ["5.7", "8.0"] wkhtmltopdf: ["0.12.6-1"] From c566a98c160c4199226ef1ef609879beb16b9a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wojda=C5=82owicz?= Date: Tue, 27 Feb 2024 17:07:49 +0100 Subject: [PATCH 14/19] Sylius 1.13 - fix behats scenarios --- features/filtering_credit_memos.feature | 2 +- .../refunding_single_order_unit_with_promotion_applied.feature | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/features/filtering_credit_memos.feature b/features/filtering_credit_memos.feature index ad8f5ee0..abed6d79 100644 --- a/features/filtering_credit_memos.feature +++ b/features/filtering_credit_memos.feature @@ -12,7 +12,7 @@ Feature: Filtering credit memos And the store has a zone "United States + United Kingdom" with code "US + UK" And this zone has the "United States" country member And this zone has the "United Kingdom" country member - And the store has a product "Mr. Meeseeks T-Shirt" priced at "$10" available in channel "Web-US" and channel "Web-UK" + And the store has a product "Mr. Meeseeks T-Shirt" priced at "$10.00" available in channel "Web-US" and channel "Web-UK" And the store ships everywhere for free for all channels And the store allows paying offline for all channels And there is a customer "rick.sanchez@wubba-lubba-dub-dub.com" that placed an order "#00000001" diff --git a/features/refunding_single_order_unit_with_promotion_applied.feature b/features/refunding_single_order_unit_with_promotion_applied.feature index f7dc9309..535a0847 100644 --- a/features/refunding_single_order_unit_with_promotion_applied.feature +++ b/features/refunding_single_order_unit_with_promotion_applied.feature @@ -10,7 +10,7 @@ Feature: Refunding a single order unit with promotion applied And the store allows shipping with "Galaxy Post" And the store allows paying with "Space money" And there is a promotion "Anatomy Park Promotion" - And this promotion gives "$1" off on every product with minimum price at "$5.00" + And this promotion gives "$1.00" off on every product with minimum price at "$5.00" And there is a customer "rick.sanchez@wubba-lubba-dub-dub.com" that placed an order "#00000022" And the customer bought 2 "Mr. Meeseeks T-Shirt" products And the customer chose "Galaxy Post" shipping method to "United States" with "Space money" payment From 8ace3234b9cea05b6402f648f900c76546ea7dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wojda=C5=82owicz?= Date: Wed, 28 Feb 2024 09:17:16 +0100 Subject: [PATCH 15/19] Sylius 1.13 - Add info about state machine adapter in gh actions --- .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 abe5d632..054a26ca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: tests: runs-on: ubuntu-latest - name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}, wkhtmltopdf: ${{ matrix.wkhtmltopdf }}" + name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}, wkhtmltopdf: ${{ matrix.wkhtmltopdf }}, State Machine Adapter ${{ matrix.state_machine_adapter }}" strategy: fail-fast: false From 0a57109c544e0c5bde0bdc8b8aa6019ab5f9a14e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wojda=C5=82owicz?= Date: Wed, 28 Feb 2024 12:46:21 +0100 Subject: [PATCH 16/19] Sylius 1.13 - Add missing info about symfony workflow in readme --- README.md | 7 +++++++ src/Resources/config/app/workflow.yaml | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 src/Resources/config/app/workflow.yaml diff --git a/README.md b/README.md index 06bafe5d..818f70d7 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,13 @@ From Administrator's point of view, every Refund request results in creating two WKHTMLTOPDF_PATH=/usr/local/bin/wkhtmltopdf # Change this! :) ``` +1. If you are using the symfony workflows instead winzou_state_machine please import configuration: + + ```yaml + imports: + - { resource: "@SyliusRefundPlugin/Resources/config/app/workflow.yaml" } + ``` + #### Beware! This installation instruction assumes that you're using Symfony Flex. If you don't, take a look at the diff --git a/src/Resources/config/app/workflow.yaml b/src/Resources/config/app/workflow.yaml new file mode 100644 index 00000000..c682d8a7 --- /dev/null +++ b/src/Resources/config/app/workflow.yaml @@ -0,0 +1,18 @@ +framework: + workflows: + workflows: + sylius_refund_refund_payment: + type: state_machine + marking_store: + type: method + property: state + supports: + - Sylius\RefundPlugin\Entity\RefundPayment + initial_marking: new + places: + - !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_NEW + - !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_COMPLETED + transitions: + complete: + from: !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_NEW + to: !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_COMPLETED From 50db97030c3a7086f48581b7e69b478eee461454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wojda=C5=82owicz?= Date: Wed, 28 Feb 2024 14:00:35 +0100 Subject: [PATCH 17/19] Sylius 1.13 - Fix duplicated configuration key --- src/Resources/config/app/workflow.yaml | 31 +++++++++---------- .../config/sylius/1.13/workflow.yaml | 31 +++++++++---------- 2 files changed, 30 insertions(+), 32 deletions(-) diff --git a/src/Resources/config/app/workflow.yaml b/src/Resources/config/app/workflow.yaml index c682d8a7..decc1053 100644 --- a/src/Resources/config/app/workflow.yaml +++ b/src/Resources/config/app/workflow.yaml @@ -1,18 +1,17 @@ framework: workflows: - workflows: - sylius_refund_refund_payment: - type: state_machine - marking_store: - type: method - property: state - supports: - - Sylius\RefundPlugin\Entity\RefundPayment - initial_marking: new - places: - - !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_NEW - - !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_COMPLETED - transitions: - complete: - from: !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_NEW - to: !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_COMPLETED + sylius_refund_refund_payment: + type: state_machine + marking_store: + type: method + property: state + supports: + - Sylius\RefundPlugin\Entity\RefundPayment + initial_marking: new + places: + - !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_NEW + - !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_COMPLETED + transitions: + complete: + from: !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_NEW + to: !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_COMPLETED diff --git a/tests/Application/config/sylius/1.13/workflow.yaml b/tests/Application/config/sylius/1.13/workflow.yaml index af6603f8..cea8c72c 100644 --- a/tests/Application/config/sylius/1.13/workflow.yaml +++ b/tests/Application/config/sylius/1.13/workflow.yaml @@ -1,21 +1,20 @@ framework: workflows: - workflows: - sylius_refund_refund_payment: - type: state_machine - marking_store: - type: method - property: state - supports: - - Sylius\RefundPlugin\Entity\RefundPayment - initial_marking: new - places: - - !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_NEW - - !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_COMPLETED - transitions: - complete: - from: !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_NEW - to: !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_COMPLETED + sylius_refund_refund_payment: + type: state_machine + marking_store: + type: method + property: state + supports: + - Sylius\RefundPlugin\Entity\RefundPayment + initial_marking: new + places: + - !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_NEW + - !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_COMPLETED + transitions: + complete: + from: !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_NEW + to: !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_COMPLETED sylius_state_machine_abstraction: graphs_to_adapters_mapping: From c3cf08ae7a62ce2a44efc8c626f62134fd4f5f40 Mon Sep 17 00:00:00 2001 From: Jan Goralski Date: Fri, 1 Mar 2024 12:59:40 +0100 Subject: [PATCH 18/19] [Maintenance] Slight fixes of 1.13 support --- .github/workflows/build.yml | 1 - README.md | 7 --- UPGRADE-1.5.md | 7 +++ ecs.php | 16 +++--- phpstan.neon | 2 +- src/Resources/config/app/config.yml | 1 + src/Resources/config/app/integrations.php | 12 ++++ .../{app => integrations}/workflow.yaml | 0 tests/Application/Kernel.php | 55 ++----------------- tests/Application/config/bundles.php | 11 +--- .../config/sylius/1.12/_sylius.yaml | 3 - .../config/sylius/1.13/_sylius.yaml | 1 - .../config/sylius/1.13/workflow.yaml | 21 ------- .../Application/public/media/image/.gitignore | 0 14 files changed, 37 insertions(+), 100 deletions(-) create mode 100644 src/Resources/config/app/integrations.php rename src/Resources/config/{app => integrations}/workflow.yaml (100%) delete mode 100644 tests/Application/config/sylius/1.12/_sylius.yaml delete mode 100644 tests/Application/config/sylius/1.13/workflow.yaml delete mode 100644 tests/Application/public/media/image/.gitignore diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 054a26ca..43324aad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,6 @@ jobs: wkhtmltopdf: ["0.12.6-1"] state_machine_adapter: [ "winzou_state_machine", "symfony_workflow" ] - include: - php: "8.1" diff --git a/README.md b/README.md index 818f70d7..06bafe5d 100644 --- a/README.md +++ b/README.md @@ -64,13 +64,6 @@ From Administrator's point of view, every Refund request results in creating two WKHTMLTOPDF_PATH=/usr/local/bin/wkhtmltopdf # Change this! :) ``` -1. If you are using the symfony workflows instead winzou_state_machine please import configuration: - - ```yaml - imports: - - { resource: "@SyliusRefundPlugin/Resources/config/app/workflow.yaml" } - ``` - #### Beware! This installation instruction assumes that you're using Symfony Flex. If you don't, take a look at the diff --git a/UPGRADE-1.5.md b/UPGRADE-1.5.md index 5411f987..9c3413d6 100644 --- a/UPGRADE-1.5.md +++ b/UPGRADE-1.5.md @@ -16,3 +16,10 @@ constructors of `Sylius\RefundPlugin\Converter\LineItem\OrderItemUnitLineItemsConverter` and `Sylius\RefundPlugin\Converter\LineItem\ShipmentLineItemsConverter` has been deprecated and will be prohibited in 2.0. + +5. Support for Sylius 1.13 has been added, it is now the recommended Sylius version to use with RefundPlugin. + +6. Support for Sylius 1.11 has been dropped, upgrade your application to [Sylius 1.12](https://github.com/Sylius/Sylius/blob/1.12/UPGRADE-1.12.md). + or to [Sylius 1.13](https://github.com/Sylius/Sylius/blob/1.13/UPGRADE-1.13.md). + +7. Support for PHP 8.0 has been dropped. diff --git a/ecs.php b/ecs.php index 7aab94f6..4d179d7a 100644 --- a/ecs.php +++ b/ecs.php @@ -9,11 +9,19 @@ { $containerConfigurator->import('vendor/sylius-labs/coding-standard/ecs.php'); + $containerConfigurator->parallel(); $containerConfigurator->paths([ 'src/', 'spec/', ]); - $containerConfigurator->parallel(); + + $containerConfigurator->skip([ + VisibilityRequiredFixer::class => ['*Spec.php'], + InlineDocCommentDeclarationSniff::class . '.MissingVariable', + 'src/Resources/config/**', + '**/var/*', + ]); + $containerConfigurator->ruleWithConfiguration( HeaderCommentFixer::class, [ @@ -29,10 +37,4 @@ TEXT ] ); - - $containerConfigurator->skip([ - VisibilityRequiredFixer::class => ['*Spec.php'], - InlineDocCommentDeclarationSniff::class . '.MissingVariable', - '**/var/*', - ]); }; diff --git a/phpstan.neon b/phpstan.neon index 2f5f6696..671fb399 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -10,7 +10,7 @@ parameters: checkMissingIterableValueType: false checkGenericClassInNonGenericObjectType: false - excludes_analyse: + excludePaths: # Makes PHPStan crash - 'src/DependencyInjection/Configuration.php' diff --git a/src/Resources/config/app/config.yml b/src/Resources/config/app/config.yml index c92be548..155d9cb0 100644 --- a/src/Resources/config/app/config.yml +++ b/src/Resources/config/app/config.yml @@ -1,5 +1,6 @@ imports: - { resource: "@SyliusRefundPlugin/Resources/config/app/events.yaml" } + - { resource: "@SyliusRefundPlugin/Resources/config/app/integrations.php" } parameters: sylius_refund.credit_memo_save_path: "%kernel.project_dir%/private/credit_memos/" diff --git a/src/Resources/config/app/integrations.php b/src/Resources/config/app/integrations.php new file mode 100644 index 00000000..4ca6519f --- /dev/null +++ b/src/Resources/config/app/integrations.php @@ -0,0 +1,12 @@ +import('../integrations/workflow.yaml'); + } +}; diff --git a/src/Resources/config/app/workflow.yaml b/src/Resources/config/integrations/workflow.yaml similarity index 100% rename from src/Resources/config/app/workflow.yaml rename to src/Resources/config/integrations/workflow.yaml diff --git a/tests/Application/Kernel.php b/tests/Application/Kernel.php index 2dcdfde2..e47c5e3a 100644 --- a/tests/Application/Kernel.php +++ b/tests/Application/Kernel.php @@ -5,28 +5,15 @@ namespace Tests\Sylius\RefundPlugin\Application; use PSS\SymfonyMockerContainer\DependencyInjection\MockerContainer; -use Sylius\Bundle\CoreBundle\Application\Kernel as SyliusKernel; +use Sylius\Bundle\CoreBundle\SyliusCoreBundle; use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; -use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Bundle\BundleInterface; use Symfony\Component\HttpKernel\Kernel as BaseKernel; -use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; final class Kernel extends BaseKernel { use MicroKernelTrait; - private const CONFIG_EXTS = '.{php,xml,yaml,yml}'; - - private const IGNORED_SERVICES_DURING_CLEANUP = [ - 'kernel', - 'http_kernel', - 'liip_imagine.mime_type_guesser', - 'liip_imagine.extension_guesser', - ]; - public function getCacheDir(): string { return $this->getProjectDir() . '/var/cache/' . $this->environment; @@ -44,26 +31,6 @@ public function registerBundles(): iterable } } - protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void - { - foreach ($this->getBundleListFiles() as $file) { - $container->addResource(new FileResource($file)); - } - - $container->setParameter('container.dumper.inline_class_loader', true); - - foreach ($this->getConfigurationDirectories() as $confDir) { - $this->loadContainerConfiguration($loader, $confDir); - } - } - - protected function configureRoutes(RoutingConfigurator $routes): void - { - foreach ($this->getConfigurationDirectories() as $confDir) { - $this->loadRoutesConfiguration($routes, $confDir); - } - } - protected function getContainerBaseClass(): string { if ($this->isTestEnvironment() && class_exists(MockerContainer::class)) { @@ -75,22 +42,7 @@ protected function getContainerBaseClass(): string private function isTestEnvironment(): bool { - return 0 === strpos($this->getEnvironment(), 'test'); - } - - private function loadContainerConfiguration(LoaderInterface $loader, string $confDir): void - { - $loader->load($confDir . '/{packages}/*' . self::CONFIG_EXTS, 'glob'); - $loader->load($confDir . '/{packages}/' . $this->environment . '/**/*' . self::CONFIG_EXTS, 'glob'); - $loader->load($confDir . '/{services}' . self::CONFIG_EXTS, 'glob'); - $loader->load($confDir . '/{services}_' . $this->environment . self::CONFIG_EXTS, 'glob'); - } - - private function loadRoutesConfiguration(RoutingConfigurator $routes, string $confDir): void - { - $routes->import($confDir . '/{routes}/*' . self::CONFIG_EXTS); - $routes->import($confDir . '/{routes}/' . $this->environment . '/**/*' . self::CONFIG_EXTS); - $routes->import($confDir . '/{routes}' . self::CONFIG_EXTS); + return str_starts_with($this->getEnvironment(), 'test'); } /** @@ -100,6 +52,7 @@ private function registerBundlesFromFile(string $bundlesFile): iterable { $contents = require $bundlesFile; + /** @var BundleInterface $class */ foreach ($contents as $class => $envs) { if (isset($envs['all']) || isset($envs[$this->environment])) { yield new $class(); @@ -130,7 +83,7 @@ private function getConfigurationDirectories(): array { $directories = [ $this->getProjectDir() . '/config', - $this->getProjectDir() . '/config/sylius/' . SyliusKernel::MAJOR_VERSION . '.' . SyliusKernel::MINOR_VERSION, + $this->getProjectDir() . '/config/sylius/' . SyliusCoreBundle::MAJOR_VERSION . '.' . SyliusCoreBundle::MINOR_VERSION, ]; return array_filter($directories, 'file_exists'); diff --git a/tests/Application/config/bundles.php b/tests/Application/config/bundles.php index 7c53154e..f82c7db5 100644 --- a/tests/Application/config/bundles.php +++ b/tests/Application/config/bundles.php @@ -1,6 +1,6 @@ ['all' => true], @@ -8,6 +8,7 @@ Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], + League\FlysystemBundle\FlysystemBundle::class => ['all' => true], Sylius\Bundle\OrderBundle\SyliusOrderBundle::class => ['all' => true], Sylius\Bundle\MoneyBundle\SyliusMoneyBundle::class => ['all' => true], Sylius\Bundle\CurrencyBundle\SyliusCurrencyBundle::class => ['all' => true], @@ -61,13 +62,7 @@ Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true], ]; -if (SyliusKernel::MINOR_VERSION > 11) { - $bundles[League\FlysystemBundle\FlysystemBundle::class] = ['all' => true]; -} else { - $bundles[Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class] = ['all' => true]; -} - -if (SyliusKernel::MINOR_VERSION == 13) { +if (SyliusCoreBundle::VERSION_ID >= '11300') { $bundles[Sylius\Abstraction\StateMachine\SyliusStateMachineAbstractionBundle::class] = ['all' => true]; } diff --git a/tests/Application/config/sylius/1.12/_sylius.yaml b/tests/Application/config/sylius/1.12/_sylius.yaml deleted file mode 100644 index faeb14bb..00000000 --- a/tests/Application/config/sylius/1.12/_sylius.yaml +++ /dev/null @@ -1,3 +0,0 @@ -parameters: - test_default_state_machine_adapter: 'winzou_state_machine' - test_sylius_state_machine_adapter: '%env(string:default:test_default_state_machine_adapter:TEST_SYLIUS_STATE_MACHINE_ADAPTER)%' diff --git a/tests/Application/config/sylius/1.13/_sylius.yaml b/tests/Application/config/sylius/1.13/_sylius.yaml index 1e5c4392..76aa43aa 100644 --- a/tests/Application/config/sylius/1.13/_sylius.yaml +++ b/tests/Application/config/sylius/1.13/_sylius.yaml @@ -2,7 +2,6 @@ parameters: test_default_state_machine_adapter: 'symfony_workflow' test_sylius_state_machine_adapter: '%env(string:default:test_default_state_machine_adapter:TEST_SYLIUS_STATE_MACHINE_ADAPTER)%' - sylius_state_machine_abstraction: graphs_to_adapters_mapping: sylius_refund_refund_payment: '%test_sylius_state_machine_adapter%' diff --git a/tests/Application/config/sylius/1.13/workflow.yaml b/tests/Application/config/sylius/1.13/workflow.yaml deleted file mode 100644 index cea8c72c..00000000 --- a/tests/Application/config/sylius/1.13/workflow.yaml +++ /dev/null @@ -1,21 +0,0 @@ -framework: - workflows: - sylius_refund_refund_payment: - type: state_machine - marking_store: - type: method - property: state - supports: - - Sylius\RefundPlugin\Entity\RefundPayment - initial_marking: new - places: - - !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_NEW - - !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_COMPLETED - transitions: - complete: - from: !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_NEW - to: !php/const Sylius\RefundPlugin\Entity\RefundPaymentInterface::STATE_COMPLETED - -sylius_state_machine_abstraction: - graphs_to_adapters_mapping: - sylius_refund_refund_payment: symfony_workflow diff --git a/tests/Application/public/media/image/.gitignore b/tests/Application/public/media/image/.gitignore deleted file mode 100644 index e69de29b..00000000 From 95884bb2502f85728fdf265057f992aeb2f7b661 Mon Sep 17 00:00:00 2001 From: Jan Goralski Date: Fri, 1 Mar 2024 17:00:35 +0100 Subject: [PATCH 19/19] [Maintenance] Update builds --- .github/workflows/build.yml | 30 ++++++++++++++++++++++++------ tests/Application/package.json | 2 +- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43324aad..18bcc92e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,22 +23,40 @@ jobs: strategy: fail-fast: false matrix: - php: ["8.1", "8.2", "8.3"] + php: ["8.1", "8.2"] symfony: ["^5.4.21", "^6.4"] sylius: ["~1.12.0", "~1.13.x-dev",] - node: ["16.x"] - mysql: ["5.7", "8.0"] + node: ["20.x"] + mysql: ["8.0"] wkhtmltopdf: ["0.12.6-1"] state_machine_adapter: [ "winzou_state_machine", "symfony_workflow" ] include: - - php: "8.1" - symfony: "^6.0" + php: "8.3" + symfony: "^6.4" + sylius: "~1.13.x-dev" + node: "20.x" + mysql: "8.0" + wkhtmltopdf: "0.12.6-1" + state_machine_adapter: "symfony_workflow" + - + php: "8.2" + symfony: "^6.4" sylius: "~1.12.0" - node: "16.x" + node: "20.x" + mysql: "8.0" + wkhtmltopdf: false + state_machine_adapter: "winzou_state_machine" + - + php: "8.2" + symfony: "^6.4" + sylius: "~1.13.x-dev" + node: "20.x" mysql: "8.0" wkhtmltopdf: false + state_machine_adapter: "symfony_workflow" + exclude: - sylius: "~1.12.0" diff --git a/tests/Application/package.json b/tests/Application/package.json index 94b2d1c8..d9d9b90d 100644 --- a/tests/Application/package.json +++ b/tests/Application/package.json @@ -52,7 +52,7 @@ "yargs": "^17.5.1" }, "engines": { - "node": "^14 || ^16 || ^18 || ^19" + "node": "^18 || ^20" }, "engineStrict": true, "scripts": {