From a206da9bdb25510300ab088d1ef087caa201726c Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Wed, 22 Nov 2023 11:46:42 +0100 Subject: [PATCH] [DependencyInjection] Fix tests on configuration prepend --- .../DependencyInjection/MergeExtensionConfigurationPassTest.php | 2 +- .../HttpKernel/Tests/Fixtures/AcmeFooBundle/AcmeFooBundle.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/MergeExtensionConfigurationPassTest.php b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/MergeExtensionConfigurationPassTest.php index c22e05636ad71..ac2264f3b224a 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/MergeExtensionConfigurationPassTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/MergeExtensionConfigurationPassTest.php @@ -48,7 +48,7 @@ public function testFooBundle() $configPass = new MergeExtensionConfigurationPass(['loaded', 'acme_foo']); $configPass->process($container); - $this->assertSame([[], ['bar' => 'baz']], $container->getExtensionConfig('loaded'), '->prependExtension() prepends an extension config'); + $this->assertSame([['bar' => 'baz'], []], $container->getExtensionConfig('loaded'), '->prependExtension() prepends an extension config'); $this->assertTrue($container->hasDefinition('acme_foo.foo'), '->loadExtension() registers a service'); $this->assertTrue($container->hasDefinition('acme_foo.bar'), '->loadExtension() imports a service'); $this->assertTrue($container->hasParameter('acme_foo.config'), '->loadExtension() sets a parameter'); diff --git a/src/Symfony/Component/HttpKernel/Tests/Fixtures/AcmeFooBundle/AcmeFooBundle.php b/src/Symfony/Component/HttpKernel/Tests/Fixtures/AcmeFooBundle/AcmeFooBundle.php index 959536ecbdc51..ef75bdfa08384 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Fixtures/AcmeFooBundle/AcmeFooBundle.php +++ b/src/Symfony/Component/HttpKernel/Tests/Fixtures/AcmeFooBundle/AcmeFooBundle.php @@ -31,7 +31,7 @@ public function configure(DefinitionConfigurator $definition): void public function prependExtension(ContainerConfigurator $container, ContainerBuilder $builder): void { - $container->extension('loaded', ['bar' => 'baz'], true); + $builder->prependExtensionConfig('loaded', ['bar' => 'baz']); } public function loadExtension(array $config, ContainerConfigurator $container, ContainerBuilder $builder): void