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

Skip to content

[TwigBundle] fixes errors with the default domain node visitor & scope #7348

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

Merged
merged 3 commits into from
Mar 12, 2013

Conversation

jfsimon
Copy link
Contributor

@jfsimon jfsimon commented Mar 12, 2013

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #7281

@Julien-Webgenery
Copy link

👍

2 similar comments
@lennerd
Copy link

lennerd commented Mar 12, 2013

👍

@rc2c
Copy link

rc2c commented Mar 12, 2013

👍

@@ -43,10 +43,6 @@ public function enterNode(\Twig_NodeInterface $node, \Twig_Environment $env)
$this->scope = $this->scope->enter();
}

if ($node instanceof \Twig_Node_Module) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we enter a new scope for Twig_Node_Module as well (i.e. when starting to parse a new template, for instance with {% embed %} ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should add a testcase for this case (it may be easier and more readable to use an integration test for this in which you render a template using a custom translator using domain:key as translation to see easily if the right domain was applied rather than comparing the AST before and after the rendering)

fabpot added a commit that referenced this pull request Mar 12, 2013
This PR was merged into the 2.1 branch.

Commits
-------

5ad4bd1 [TwigBridge] now enter/leave scope on Twig_Node_Module
fe4cc24 [TwigBridge] fixed fixed scope & trans_default_domain node visitor
c5e999a [TwigBridge] fixed non probant tests & added new one

Discussion
----------

[TwigBundle] fixes errors with the default domain node visitor & scope

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7281

---------------------------------------------------------------------------

by Julien-Webgenery at 2013-03-12T16:35:58Z

:+1:

---------------------------------------------------------------------------

by lennerd at 2013-03-12T16:38:40Z

:+1:

---------------------------------------------------------------------------

by rc2c at 2013-03-12T16:53:04Z

:+1:
@fabpot fabpot merged commit 5ad4bd1 into symfony:2.1 Mar 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants