Skip to content

Commit

Permalink
refactor #293 [Maintenance] Remove redundant configuration for not su…
Browse files Browse the repository at this point in the history
…pported Sylius 1.10 (coldic3)

This PR was merged into the main branch.

Discussion
----------



Commits
-------

ce200f8 [Maintenance] Remove redundant configuration
  • Loading branch information
GSadee authored Sep 22, 2022
2 parents 691d6a3 + ce200f8 commit 265eefa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
1 change: 1 addition & 0 deletions tests/Application/config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
Sylius\Bundle\CoreBundle\SyliusCoreBundle::class => ['all' => true],
Sylius\Bundle\ResourceBundle\SyliusResourceBundle::class => ['all' => true],
Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
Sylius\Calendar\SyliusCalendarBundle::class => ['all' => true],
winzou\Bundle\StateMachineBundle\winzouStateMachineBundle::class => ['all' => true],
Sonata\BlockBundle\SonataBlockBundle::class => ['all' => true],
Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle::class => ['all' => true],
Expand Down
10 changes: 1 addition & 9 deletions tests/Application/src/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected function getContainerLoader(ContainerInterface $container): LoaderInte
{
/** @var ContainerBuilder $container */
Assert::isInstanceOf($container, ContainerBuilder::class);
$locator = new FileLocator($this, $this->getProjectDir() . '/src/Resources');
$locator = new FileLocator($this);
$resolver = new LoaderResolver(array(
new XmlFileLoader($container, $locator),
new YamlFileLoader($container, $locator),
Expand Down Expand Up @@ -123,13 +123,6 @@ private function registerBundlesFromFile(string $bundlesFile): iterable
{
$contents = require $bundlesFile;

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();
Expand Down Expand Up @@ -157,7 +150,6 @@ private function getConfigurationDirectories(): array
{
$directories = [
$this->getProjectDir() . '/config',
$this->getProjectDir() . '/config/sylius/' . SyliusKernel::MAJOR_VERSION . '.' . SyliusKernel::MINOR_VERSION,
];

return array_filter($directories, 'file_exists');
Expand Down

0 comments on commit 265eefa

Please sign in to comment.