diff --git a/Resources/config/extractors.yml b/Resources/config/extractors.yml index 0f8fd41d..bb191a25 100644 --- a/Resources/config/extractors.yml +++ b/Resources/config/extractors.yml @@ -53,7 +53,7 @@ services: # Twig Visitors: php_translation.extractor.twig.visitor.twig: - class: Translation\Extractor\Visitor\Twig\Twig2Visitor + class: Translation\Bundle\Twig\DummyTwigVisitor factory: [Translation\Extractor\Visitor\Twig\TwigVisitor, create] tags: - { name: 'php_translation.visitor', type: 'twig' } diff --git a/Twig/DummyTwigVisitor.php b/Twig/DummyTwigVisitor.php new file mode 100644 index 00000000..d73fa0bd --- /dev/null +++ b/Twig/DummyTwigVisitor.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Translation\Bundle\Twig; + +/** + * This dummy extractor is used to be compatible with both Twig1 and Twig2. It is only used in dependency injection + * container. + * + * @author Tobias Nyholm + */ +class DummyTwigVisitor +{ +}