[TwigBundle] Fix twig loader registered twice
This commit is contained in:
parent
c360a222ef
commit
2c818193c1
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\TwigBundle\DependencyInjection\Compiler;
|
namespace Symfony\Bundle\TwigBundle\DependencyInjection\Compiler;
|
||||||
|
|
||||||
|
use Symfony\Component\DependencyInjection\Alias;
|
||||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
use Symfony\Component\DependencyInjection\Reference;
|
use Symfony\Component\DependencyInjection\Reference;
|
||||||
@ -73,7 +74,7 @@ class ExtensionPass implements CompilerPassInterface
|
|||||||
$loader->addTag('twig.loader');
|
$loader->addTag('twig.loader');
|
||||||
$loader->setMethodCalls($container->getDefinition('twig.loader.filesystem')->getMethodCalls());
|
$loader->setMethodCalls($container->getDefinition('twig.loader.filesystem')->getMethodCalls());
|
||||||
|
|
||||||
$container->setDefinition('twig.loader.filesystem', $loader);
|
$container->setAlias('twig.loader.filesystem', new Alias('twig.loader.native_filesystem', false));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($container->has('assets.packages')) {
|
if ($container->has('assets.packages')) {
|
||||||
|
Reference in New Issue
Block a user