From 3d3b625c30d24d72c68c204836d72d3a2198eb9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Fri, 3 Oct 2025 10:01:07 +0200 Subject: [PATCH] Skip XML config tests with Symfony 8.0 --- tests/DependencyInjection/XmlMonologExtensionTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/DependencyInjection/XmlMonologExtensionTest.php b/tests/DependencyInjection/XmlMonologExtensionTest.php index 3ebcd2f1..08ba82a8 100644 --- a/tests/DependencyInjection/XmlMonologExtensionTest.php +++ b/tests/DependencyInjection/XmlMonologExtensionTest.php @@ -11,7 +11,7 @@ namespace Symfony\Bundle\MonologBundle\Tests\DependencyInjection; -use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\IgnoreDeprecations; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; @@ -19,11 +19,15 @@ /** * XML configuration deprecated since Symfony 7.4. */ -#[Group('legacy')] +#[IgnoreDeprecations] class XmlMonologExtensionTest extends FixtureMonologExtensionTestCase { protected function loadFixture(ContainerBuilder $container, string $fixture) { + if (!class_exists(XmlFileLoader::class)) { + $this->markTestSkipped('The XML configuration has been removed in Symfony 8.0.'); + } + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/Fixtures/xml')); $loader->load($fixture.'.xml'); }