diff --git a/tests/Application/Kernel.php b/tests/Application/Kernel.php index 9568e448..45e06e04 100644 --- a/tests/Application/Kernel.php +++ b/tests/Application/Kernel.php @@ -100,18 +100,6 @@ private function registerBundlesFromFile(string $bundlesFile): iterable { $contents = require $bundlesFile; - if (SyliusKernel::MINOR_VERSION > 11) { - $contents = array_merge( - ['League\FlysystemBundle\FlysystemBundle' => ['all' => true]], - $contents, - ); - } else { - $contents = array_merge( - ['Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle' => ['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 42a4118c..143e9c41 100644 --- a/tests/Application/config/bundles.php +++ b/tests/Application/config/bundles.php @@ -1,6 +1,8 @@ ['all' => true], Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], @@ -58,3 +60,11 @@ SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true], 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]; +} + +return $bundles;