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:
Fabien Potencier 2017-06-15 07:32:56 -07:00
commit 511905d417
1 changed files with 1 additions and 0 deletions

View File

@ -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')) {