File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
tests/Unit/DependencyInjection Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1313use Symfony \Component \Config \Definition \ConfigurationInterface ;
1414use Symfony \Component \Config \Definition \Exception \InvalidConfigurationException ;
1515use Symfony \Component \DependencyInjection \Extension \ExtensionInterface ;
16+ use Symfony \Component \HttpKernel \Kernel ;
17+ use function class_exists ;
1618
1719/**
1820 * @author David Buchmann <[email protected] > @@ -322,11 +324,17 @@ public function testSupportsAllConfigFormats(): void
322324 ],
323325 ];
324326
325- $ formats = array_map ( fn ( $ path ) => __DIR__ . ' /../../Resources/Fixtures/ ' . $ path , [
327+ $ formats = [
326328 'config/full.yml ' ,
327- 'config/full.xml ' ,
328329 'config/full.php ' ,
329- ]);
330+ ];
331+
332+ // XML configuration is not supported in Symfony 8+
333+ if (class_exists ('Symfony\Component\DependencyInjection\Loader\XmlFileLoader ' )) {
334+ $ formats [] = 'config/full.xml ' ;
335+ }
336+
337+ $ formats = array_map (fn ($ path ) => __DIR__ .'/../../Resources/Fixtures/ ' .$ path , $ formats );
330338
331339 foreach ($ formats as $ format ) {
332340 $ this ->assertProcessedConfigurationEquals ($ expectedConfiguration , [$ format ]);
You can’t perform that action at this time.
0 commit comments