[TwigBundle] removed Stopwatch Twig extension when the Stopwatch component is not available
This commit is contained in:
parent
d0792e454e
commit
3d4ad0b084
@ -75,5 +75,9 @@ class ExtensionPass implements CompilerPassInterface
|
||||
if (class_exists('Symfony\Component\Yaml\Parser')) {
|
||||
$container->getDefinition('twig.extension.yaml')->addTag('twig.extension');
|
||||
}
|
||||
|
||||
if (class_exists('Symfony\Component\Stopwatch\Stopwatch')) {
|
||||
$container->getDefinition('twig.extension.debug.stopwatch')->addTag('twig.extension');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -98,7 +98,6 @@
|
||||
<service id="twig.extension.yaml" class="Symfony\Bridge\Twig\Extension\YamlExtension" public="false" />
|
||||
|
||||
<service id="twig.extension.debug.stopwatch" class="Symfony\Bridge\Twig\Extension\StopwatchExtension" public="false">
|
||||
<tag name="twig.extension" />
|
||||
<argument type="service" id="debug.stopwatch" on-invalid="ignore" />
|
||||
<argument>%kernel.debug%</argument>
|
||||
</service>
|
||||
|
Reference in New Issue
Block a user