From b31109a1f24060ea512b8c501a5f9aca0138c0df Mon Sep 17 00:00:00 2001 From: Yuri Gaidoba Date: Fri, 17 Nov 2023 11:28:05 +0100 Subject: [PATCH] SUPPORT-86535 - added legacy_services --- .../PayseraFixtureTestExtension.php | 4 +- .../Resources/config/legacy_services.xml | 102 ++++++++++++++++++ 2 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 tests/Functional/Fixtures/FixtureTestBundle/Resources/config/legacy_services.xml diff --git a/tests/Functional/Fixtures/FixtureTestBundle/DependencyInjection/PayseraFixtureTestExtension.php b/tests/Functional/Fixtures/FixtureTestBundle/DependencyInjection/PayseraFixtureTestExtension.php index f1e4612..0fd5676 100644 --- a/tests/Functional/Fixtures/FixtureTestBundle/DependencyInjection/PayseraFixtureTestExtension.php +++ b/tests/Functional/Fixtures/FixtureTestBundle/DependencyInjection/PayseraFixtureTestExtension.php @@ -7,6 +7,7 @@ use Symfony\Component\Config\FileLocator; use Symfony\Component\HttpKernel\DependencyInjection\Extension; use Symfony\Component\DependencyInjection\Loader; +use Symfony\Component\HttpKernel\Kernel; /** * This is the class that loads and manages your bundle configuration. @@ -24,7 +25,8 @@ public function load(array $configs, ContainerBuilder $container) $config = $this->processConfiguration($configuration, $configs); $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); - $loader->load('services.xml'); + $prefix = Kernel::MAJOR_VERSION <= 4 ? 'legacy_' : ''; + $loader->load($prefix . 'services.xml'); } } diff --git a/tests/Functional/Fixtures/FixtureTestBundle/Resources/config/legacy_services.xml b/tests/Functional/Fixtures/FixtureTestBundle/Resources/config/legacy_services.xml new file mode 100644 index 0000000..48c04aa --- /dev/null +++ b/tests/Functional/Fixtures/FixtureTestBundle/Resources/config/legacy_services.xml @@ -0,0 +1,102 @@ + + + + + + + + + + parameter + + + + parameter_custom + + + + key + + + + key_custom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + extract:parameter + + + parameter + + + + + + + + + + + + + + + + + + + + + + + + +