From b69f05eecbe866a5d32853a922359787e59383e1 Mon Sep 17 00:00:00 2001 From: Michael Babker Date: Mon, 8 Dec 2025 10:09:00 -0500 Subject: [PATCH] Skip XML test when the Symfony version doesn't support XML --- tests/Functional/BundleConfigurationTest.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/Functional/BundleConfigurationTest.php b/tests/Functional/BundleConfigurationTest.php index 546b54d..2fa90bb 100644 --- a/tests/Functional/BundleConfigurationTest.php +++ b/tests/Functional/BundleConfigurationTest.php @@ -9,6 +9,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\DependencyInjection\Compiler\PassConfig; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; use Symfony\Component\HttpKernel\KernelInterface; /** @@ -37,7 +38,6 @@ public function provideBundleWithDifferentConfigurationFormats(): array { return [ [__DIR__.'/../Fixtures/Resources/ConfigurationBundle/config.yml'], - [__DIR__.'/../Fixtures/Resources/ConfigurationBundle/config.xml'], [__DIR__.'/../Fixtures/Resources/ConfigurationBundle/config.php'], [function (ContainerBuilder $container) { $container->loadFromExtension('configuration', [ @@ -46,6 +46,12 @@ public function provideBundleWithDifferentConfigurationFormats(): array ]); }], ]; + + if (class_exists(XmlFileLoader::class)) { + $formats[] = [__DIR__.'/../Fixtures/Resources/ConfigurationBundle/config.xml']; + } + + return $formats; } /**