Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 82aa135

Browse filesBrowse files
committed
[TwigBundle] added conditions for routing & httpkernel extensions
1 parent ad5eb7e commit 82aa135
Copy full SHA for 82aa135

File tree

Expand file treeCollapse file tree

2 files changed

+8
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-2
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,13 @@ public function process(ContainerBuilder $container)
3030
if ($container->has('translator')) {
3131
$container->getDefinition('twig.extension.trans')->addTag('twig.extension');
3232
}
33+
34+
if ($container->has('router')) {
35+
$container->getDefinition('twig.extension.routing')->addTag('twig.extension');
36+
}
37+
38+
if ($container->has('fragment.handler')) {
39+
$container->getDefinition('twig.extension.httpkernel')->addTag('twig.extension');
40+
}
3341
}
3442
}

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
</service>
8080

8181
<service id="twig.extension.routing" class="%twig.extension.routing.class%" public="false">
82-
<tag name="twig.extension" />
8382
<argument type="service" id="router" />
8483
</service>
8584

@@ -88,7 +87,6 @@
8887
</service>
8988

9089
<service id="twig.extension.httpkernel" class="%twig.extension.httpkernel.class%" public="false">
91-
<tag name="twig.extension" />
9290
<argument type="service" id="fragment.handler" />
9391
</service>
9492

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.