Skip to content

Commit

Permalink
Make sure we do not bind to specific twig version before the TwigVisi… (
Browse files Browse the repository at this point in the history
#99)

* Make sure we do not bind to specific twig version before the TwigVisitorFactory has been executed

* cs
  • Loading branch information
Nyholm authored Jun 3, 2017
1 parent 5b5fb76 commit 389443e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/config/extractors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
22 changes: 22 additions & 0 deletions Twig/DummyTwigVisitor.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

/*
* This file is part of the PHP Translation package.
*
* (c) PHP Translation team <[email protected]>
*
* 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 <[email protected]>
*/
class DummyTwigVisitor
{
}

0 comments on commit 389443e

Please sign in to comment.