From aca8ff2c1dce1481a5c9303a65c082510d080029 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Sat, 3 Jun 2017 10:29:56 +0200 Subject: [PATCH 1/2] Make sure we do not bind to specific twig version before the TwigVisitorFactory has been executed --- Resources/config/extractors.yml | 2 +- Twig/DummyTwigVisitor.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 Twig/DummyTwigVisitor.php 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..f83e6dc7 --- /dev/null +++ b/Twig/DummyTwigVisitor.php @@ -0,0 +1,14 @@ + + */ +class DummyTwigVisitor +{ + +} From ed3cc7215aa09d769f305c7178fee2520e83cd9a Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Sat, 3 Jun 2017 10:33:51 +0200 Subject: [PATCH 2/2] cs --- Twig/DummyTwigVisitor.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Twig/DummyTwigVisitor.php b/Twig/DummyTwigVisitor.php index f83e6dc7..d73fa0bd 100644 --- a/Twig/DummyTwigVisitor.php +++ b/Twig/DummyTwigVisitor.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Translation\Bundle\Twig; /** @@ -10,5 +19,4 @@ */ class DummyTwigVisitor { - }