Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaf1f030

Browse files
[DependencyInjection][Routing] Remove support for the XML configuration format
1 parent16c6c07 commitaf1f030

File tree

319 files changed

+7
-10998
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

319 files changed

+7
-10998
lines changed

‎src/Symfony/Bundle/DebugBundle/Resources/config/schema/debug-1.0.xsd‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

‎src/Symfony/Bundle/FrameworkBundle/Command/BuildDebugContainerTrait.php‎

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
namespaceSymfony\Bundle\FrameworkBundle\Command;
1313

1414
useSymfony\Component\Config\ConfigCache;
15-
useSymfony\Component\Config\FileLocator;
16-
useSymfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass;
1715
useSymfony\Component\DependencyInjection\ContainerBuilder;
18-
useSymfony\Component\DependencyInjection\Loader\XmlFileLoader;
1916
useSymfony\Component\HttpKernel\KernelInterface;
2017

2118
/**
@@ -60,16 +57,10 @@ protected function getContainerBuilder(KernelInterface $kernel): ContainerBuilde
6057
},$kernel,$kernel::class);
6158
$container =$buildContainer();
6259

63-
if (str_ends_with($file,'.xml') &&is_file(substr_replace($file,'.ser', -4))) {
64-
$dumpedContainer =unserialize(file_get_contents(substr_replace($file,'.ser', -4)));
65-
$container->setDefinitions($dumpedContainer->getDefinitions());
66-
$container->setAliases($dumpedContainer->getAliases());
67-
$container->__construct($dumpedContainer->getParameterBag());
68-
}else {
69-
(newXmlFileLoader($container,newFileLocator()))->load($file);
70-
$locatorPass =newServiceLocatorTagPass();
71-
$locatorPass->process($container);
72-
}
60+
$dumpedContainer =unserialize(file_get_contents(substr_replace($file,'.ser', -4)));
61+
$container->setDefinitions($dumpedContainer->getDefinitions());
62+
$container->setAliases($dumpedContainer->getAliases());
63+
$container->__construct($dumpedContainer->getParameterBag());
7364
}
7465

7566
return$this->container =$container;

‎src/Symfony/Bundle/FrameworkBundle/Command/ContainerLintCommand.php‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespaceSymfony\Bundle\FrameworkBundle\Command;
1313

1414
useSymfony\Component\Config\ConfigCache;
15-
useSymfony\Component\Config\FileLocator;
1615
useSymfony\Component\Console\Attribute\AsCommand;
1716
useSymfony\Component\Console\Command\Command;
1817
useSymfony\Component\Console\Exception\RuntimeException;
@@ -27,8 +26,6 @@
2726
useSymfony\Component\DependencyInjection\Compiler\ResolveParameterPlaceHoldersPass;
2827
useSymfony\Component\DependencyInjection\ContainerBuilder;
2928
useSymfony\Component\DependencyInjection\Exception\InvalidArgumentException;
30-
useSymfony\Component\DependencyInjection\Loader\XmlFileLoader;
31-
useSymfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
3229
useSymfony\Component\HttpKernel\Kernel;
3330

3431
#[AsCommand(name:'lint:container', description:'Ensure that arguments injected into services match type declarations')]
@@ -96,11 +93,7 @@ private function getContainerBuilder(bool $resolveEnvVars): ContainerBuilder
9693
},$kernel,$kernel::class);
9794
$container =$buildContainer();
9895
}else {
99-
if (str_ends_with($file,'.xml') &&is_file(substr_replace($file,'.ser', -4))) {
100-
$container =unserialize(file_get_contents(substr_replace($file,'.ser', -4)));
101-
}else {
102-
(newXmlFileLoader($container =newContainerBuilder(newEnvPlaceholderParameterBag()),newFileLocator()))->load($file);
103-
}
96+
$container =unserialize(file_get_contents(substr_replace($file,'.ser', -4)));
10497

10598
if (!$containerinstanceof ContainerBuilder) {
10699
thrownewRuntimeException(\sprintf('This command does not support the application container: "%s" is not a "%s".',get_debug_type($container), ContainerBuilder::class));

‎src/Symfony/Bundle/FrameworkBundle/Resources/config/routing.php‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
useSymfony\Component\Routing\Loader\GlobFileLoader;
3333
useSymfony\Component\Routing\Loader\PhpFileLoader;
3434
useSymfony\Component\Routing\Loader\Psr4DirectoryLoader;
35-
useSymfony\Component\Routing\Loader\XmlFileLoader;
3635
useSymfony\Component\Routing\Loader\YamlFileLoader;
3736
useSymfony\Component\Routing\Matcher\Dumper\CompiledUrlMatcherDumper;
3837
useSymfony\Component\Routing\Matcher\ExpressionLanguageProvider;
@@ -51,13 +50,6 @@
5150
$container->services()
5251
->set('routing.resolver', LoaderResolver::class)
5352

54-
->set('routing.loader.xml', XmlFileLoader::class)
55-
->args([
56-
service('file_locator'),
57-
'%kernel.environment%',
58-
])
59-
->tag('routing.loader')
60-
6153
->set('routing.loader.yml', YamlFileLoader::class)
6254
->args([
6355
service('file_locator'),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp