-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[TwigBridge] fixed trans twig extractor #7206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Q | A |
---|---|
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #6943 |
…her visitor to get the value when it is a constant
@@ -68,6 +74,10 @@ public function enterNode(\Twig_NodeInterface $node, \Twig_Environment $env) | |||
*/ | |||
public function leaveNode(\Twig_NodeInterface $node, \Twig_Environment $env) | |||
{ | |||
if ($node instanceof TransDefaultDomainNode) { | |||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong. A visitor has to return a node, not a boolean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or false
to remove the node ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then the phpdoc of the interface is wrong
This PR was squashed before being merged into the 2.1 branch (closes #7206). Commits ------- bae83c7 [TwigBridge] fixed trans twig extractor Discussion ---------- [TwigBridge] fixed trans twig extractor | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #6943