From f2ec6dcb270452495e4f71a39ae409524aca71db Mon Sep 17 00:00:00 2001 From: Grzegorz Sadowski Date: Mon, 10 Jun 2024 12:40:50 +0200 Subject: [PATCH 1/2] Update Kernel and bundles configuration in test application --- tests/Application/Kernel.php | 14 -------------- tests/Application/config/bundles.php | 12 +++++------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/tests/Application/Kernel.php b/tests/Application/Kernel.php index 7c60a15c..a1d84d5e 100644 --- a/tests/Application/Kernel.php +++ b/tests/Application/Kernel.php @@ -100,20 +100,6 @@ private function registerBundlesFromFile(string $bundlesFile): iterable { $contents = require $bundlesFile; - if (SyliusCoreBundle::MINOR_VERSION > 10) { - $contents = array_merge( - ['Sylius\Calendar\SyliusCalendarBundle' => ['all' => true]], - $contents, - ); - } - - if (SyliusCoreBundle::MINOR_VERSION > 12) { - $contents = array_merge( - ['Sylius\Abstraction\StateMachine\SyliusStateMachineAbstractionBundle' => ['all' => true]], - $contents, - ); - } - foreach ($contents as $class => $envs) { if (isset($envs['all']) || isset($envs[$this->environment])) { yield new $class(); diff --git a/tests/Application/config/bundles.php b/tests/Application/config/bundles.php index 815cd826..f1d37e5a 100644 --- a/tests/Application/config/bundles.php +++ b/tests/Application/config/bundles.php @@ -2,7 +2,7 @@ declare(strict_types=1); -use Sylius\Bundle\CoreBundle\Application\Kernel; +use Sylius\Bundle\CoreBundle\SyliusCoreBundle; $bundles = [ Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], @@ -10,6 +10,7 @@ Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], + Sylius\Calendar\SyliusCalendarBundle::class => ['all' => true], Sylius\Bundle\OrderBundle\SyliusOrderBundle::class => ['all' => true], Sylius\Bundle\MoneyBundle\SyliusMoneyBundle::class => ['all' => true], Sylius\Bundle\CurrencyBundle\SyliusCurrencyBundle::class => ['all' => true], @@ -39,6 +40,7 @@ FOS\RestBundle\FOSRestBundle::class => ['all' => true], Knp\Bundle\GaufretteBundle\KnpGaufretteBundle::class => ['all' => true], Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true], + League\FlysystemBundle\FlysystemBundle::class => ['all' => true], Liip\ImagineBundle\LiipImagineBundle::class => ['all' => true], Payum\Bundle\PayumBundle\PayumBundle::class => ['all' => true], Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true], @@ -62,12 +64,8 @@ Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true], ]; -if (Kernel::VERSION_ID < 11200) { - $bundles[Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class] = ['all' => true]; -} - -if (11200 <= Kernel::VERSION_ID) { - $bundles[League\FlysystemBundle\FlysystemBundle::class] = ['all' => true]; +if (SyliusCoreBundle::VERSION_ID >= '11300') { + $bundles[Sylius\Abstraction\StateMachine\SyliusStateMachineAbstractionBundle::class] = ['all' => true]; } return $bundles; From 6fa4d23274bfac872fcaa83206a53298822750a1 Mon Sep 17 00:00:00 2001 From: Grzegorz Sadowski Date: Mon, 10 Jun 2024 12:41:39 +0200 Subject: [PATCH 2/2] [Composer] Add PHP version to requirements --- .github/workflows/{build.yml => build.yaml} | 2 +- composer.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) rename .github/workflows/{build.yml => build.yaml} (99%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yaml similarity index 99% rename from .github/workflows/build.yml rename to .github/workflows/build.yaml index f1ef128d..96dd26d2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yaml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - php: ["8.1","8.2","8.3"] + php: ["8.1", "8.2", "8.3"] symfony: ["^5.4", "^6.4"] sylius: ["~1.12.0", "~1.13.0"] node: ["20.x"] diff --git a/composer.json b/composer.json index 56e0bce3..e7238525 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,7 @@ } ], "require": { + "php": "^8.1", "sylius/sylius": "~1.12.0 || ~1.13.0", "friendsofsymfony/jsrouting-bundle": "^3.2" },