fixed some deprecated notices
This commit is contained in:
parent
d752f74161
commit
84f3753b33
@ -13,6 +13,7 @@ namespace Symfony\Bundle\TwigBundle\DependencyInjection\Compiler;
|
|||||||
|
|
||||||
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\ContainerInterface;
|
||||||
use Symfony\Component\DependencyInjection\Reference;
|
use Symfony\Component\DependencyInjection\Reference;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -63,6 +64,10 @@ class ExtensionPass implements CompilerPassInterface
|
|||||||
$container->getDefinition('twig.extension.code')->replaceArgument(0, $container->getParameter('templating.helper.code.file_link_format'));
|
$container->getDefinition('twig.extension.code')->replaceArgument(0, $container->getParameter('templating.helper.code.file_link_format'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$container->has('security.token_storage')) {
|
||||||
|
$container->getDefinition('twig.app_variable')->addMethodCall('setSecurity', array(new Reference('security.context', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)));
|
||||||
|
}
|
||||||
|
|
||||||
if ($container->has('templating')) {
|
if ($container->has('templating')) {
|
||||||
$container->getDefinition('twig.cache_warmer')->addTag('kernel.cache_warmer');
|
$container->getDefinition('twig.cache_warmer')->addTag('kernel.cache_warmer');
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
<service id="twig.app_variable" class="Symfony\Bridge\Twig\AppVariable" public="false">
|
<service id="twig.app_variable" class="Symfony\Bridge\Twig\AppVariable" public="false">
|
||||||
<call method="setEnvironment"><argument>%kernel.environment%</argument></call>
|
<call method="setEnvironment"><argument>%kernel.environment%</argument></call>
|
||||||
<call method="setDebug"><argument>%kernel.debug%</argument></call>
|
<call method="setDebug"><argument>%kernel.debug%</argument></call>
|
||||||
<call method="setSecurity"><argument type="service" id="security.context" on-invalid="ignore" /></call>
|
|
||||||
<call method="setTokenStorage"><argument type="service" id="security.token_storage" on-invalid="ignore" /></call>
|
<call method="setTokenStorage"><argument type="service" id="security.token_storage" on-invalid="ignore" /></call>
|
||||||
<call method="setRequestStack"><argument type="service" id="request_stack" on-invalid="ignore" /></call>
|
<call method="setRequestStack"><argument type="service" id="request_stack" on-invalid="ignore" /></call>
|
||||||
</service>
|
</service>
|
||||||
|
Reference in New Issue
Block a user