Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 954e9f1

Browse files
feature #23037 [TwigBundle] Added a RuntimeExtensionInterface to take advantage of autoconfigure (lyrixx)
This PR was merged into the 3.4 branch. Discussion ---------- [TwigBundle] Added a RuntimeExtensionInterface to take advantage of autoconfigure | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - (asked by @nicolas-grekas) | License | MIT | Doc PR | - --- Before: ```yaml #app/config/services.yml services: _defaults: autoconfigure: true AppBundle\Twig\HelloExtension: tags: ['twig.runtime'] ``` After: ```yaml #app/config/services.yml services: _defaults: autoconfigure: true #Yes, there are nothing anymore ``` Commits ------- ba8763b [TwigBundle] Added a RuntimeExtensionInterface to take advantage of autoconfigure
2 parents 66ead2e + ba8763b commit 954e9f1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
2020
use Symfony\Component\WebLink\HttpHeaderSerializer;
2121
use Twig\Extension\ExtensionInterface;
22+
use Twig\Extension\RuntimeExtensionInterface;
2223
use Twig\Loader\LoaderInterface;
2324

2425
/**
@@ -150,6 +151,7 @@ public function load(array $configs, ContainerBuilder $container)
150151
$container->registerForAutoconfiguration(\Twig_LoaderInterface::class)->addTag('twig.loader');
151152
$container->registerForAutoconfiguration(ExtensionInterface::class)->addTag('twig.extension');
152153
$container->registerForAutoconfiguration(LoaderInterface::class)->addTag('twig.loader');
154+
$container->registerForAutoconfiguration(RuntimeExtensionInterface::class)->addTag('twig.runtime');
153155

154156
if (\PHP_VERSION_ID < 70000) {
155157
$this->addClassesToCompile(array(

0 commit comments

Comments
 (0)