From 59d587db05fdb18dac4c929c15091294f5be7dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pysiak?= Date: Tue, 25 Jun 2024 13:10:12 +0200 Subject: [PATCH] Fix for Sylius 1.12 --- tests/Application/TestKernel.php | 9 +++++++-- tests/Application/config/config.yaml | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/Application/TestKernel.php b/tests/Application/TestKernel.php index 9cc1c22..3d37df8 100644 --- a/tests/Application/TestKernel.php +++ b/tests/Application/TestKernel.php @@ -68,7 +68,7 @@ final class TestKernel extends Kernel { public function registerBundles(): array { - return [ + $bundles = [ new FrameworkBundle(), new SecurityBundle(), new TwigBundle(), @@ -108,7 +108,6 @@ public function registerBundles(): array new BabDevPagerfantaBundle(), new WebpackEncoreBundle(), new winzouStateMachineBundle(), - new SyliusStateMachineAbstractionBundle(), new DoctrineMigrationsBundle(), new SonataBlockBundle(), new SyliusLabsDoctrineMigrationsExtraBundle(), @@ -118,6 +117,12 @@ public function registerBundles(): array new NelmioAliceBundle(), new FidryAliceDataFixturesBundle(), ]; + + if (SyliusCoreBundle::VERSION_ID >= '11300') { + $bundles[] = new SyliusStateMachineAbstractionBundle(); + } + + return $bundles; } public function registerContainerConfiguration(LoaderInterface $loader): void diff --git a/tests/Application/config/config.yaml b/tests/Application/config/config.yaml index 8b02029..1e7396e 100644 --- a/tests/Application/config/config.yaml +++ b/tests/Application/config/config.yaml @@ -2,6 +2,10 @@ imports: - { resource: '@SyliusCoreBundle/Resources/config/app/config.yml' } - { resource: '@SyliusGmvBundle/config/services.xml' } +services: + parameters: + locale: en_US + security: firewalls: main: