10000 Revert "minor #13434 fixed some deprecated notices (fabpot)" · symfony/symfony@1067cc5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1067cc5

Browse files
committed
Revert "minor #13434 fixed some deprecated notices (fabpot)"
This reverts commit 564ae34, reversing changes made to df76faa.
1 parent 339afca commit 1067cc5

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
1515
use Symfony\Component\DependencyInjection\ContainerBuilder;
16-
use Symfony\Component\DependencyInjection\ContainerInterface;
1716
use Symfony\Component\DependencyInjection\Reference;
1817

1918
/**
@@ -64,10 +63,6 @@ public function process(ContainerBuilder $container)
6463
$container->getDefinition('twig.extension.code')->replaceArgument(0, $container->getParameter('templating.helper.code.file_link_format'));
6564
}
6665

67-
if (!$container->has('security.token_storage')) {
68-
$container->getDefinition('twig.app_variable')->addMethodCall('setSecurity', array(new Reference('security.context', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)));
69-
}
70-
7166
if ($container->has('templating')) {
7267
$container->getDefinition('twig.cache_warmer')->addTag('kernel.cache_warmer');
7368

src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
<service id="twig.app_variable" class="Symfony\Bridge\Twig\AppVariable" public="false">
4242
<call method="setEnvironment"><argument>%kernel.environment%</argument></call>
4343
<call method="setDebug"><argument>%kernel.debug%</argument></call>
44+
<call method="setSecurity"><argument type="service" id="security.context" on-invalid="ignore" /></call>
4445
<call method="setTokenStorage"><argument type="service" id="security.token_storage" on-invalid="ignore" /></call>
4546
<call method="setRequestStack"><argument type="service" id="request_stack" on-invalid="ignore" /></call>
4647
</service>

0 commit comments

Comments
 (0)
0