bug #23186 [TwigBundle] Move template.xml loading to a compiler pass (ogizanagi)
This PR was merged into the 2.7 branch.
Discussion
----------
[TwigBundle] Move template.xml loading to a compiler pass
| Q | A
| ------------- | ---
| Branch? | 2.7 <!-- see comment below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | #23181 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
(failures unrelated)
Commits
-------
6ac0de8c2f
[TwigBundle] Remove template.xml services when templating is disabled
This commit is contained in:
commit
511905d417
|
@ -96,6 +96,7 @@ class ExtensionPass implements CompilerPassInterface
|
|||
$twigLoader->clearTag('twig.loader');
|
||||
} else {
|
||||
$container->setAlias('twig.loader.filesystem', new Alias('twig.loader.native_filesystem', false));
|
||||
$container->removeDefinition('templating.engine.twig');
|
||||
}
|
||||
|
||||
if ($container->has('assets.packages')) {
|
||||
|
|
Reference in New Issue