Skip to content

[TwigBundle] fix configuration tree for paths #9719

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

Closed

Conversation

cordoval
Copy link
Contributor

@cordoval cordoval commented Dec 6, 2013

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #8171
License MIT
Doc PR na

This is a joint effort with @mdavis1982 and @cordoval 👶 pairing up and warming for hacking day in Warsaw

@@ -79,4 +79,40 @@ public function getPreNormalizationTests()
)
);
}

/**
* @group cordoval-davis
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be removed.

@cordoval
Copy link
Contributor Author

cordoval commented Dec 6, 2013

@stof if you have suggestions besides the name of the keys would be great

other than that this fixes the other issue so ready to merge @fabpot

@fabpot
Copy link
Member

fabpot commented Dec 17, 2013

Could you also add a test to cover the fix?

@cordoval
Copy link
Contributor Author

let's :shipit: chief

👶

of course after travis is green @fabpot

@cordoval
Copy link
Contributor Author

ping @fabpot

@cordoval
Copy link
Contributor Author

@fabpot fixing things related, would be great if you display the branch name on the fabbot related pages so to make them handy

@cordoval
Copy link
Contributor Author

@fabpot all good here, WCM, even though @fabbot complains about some grammar issues which is nonsense 👶

@cordoval
Copy link
Contributor Author

bump @fabpot

@fabpot
Copy link
Member

fabpot commented Dec 31, 2013

@cordoval Can you rebase on current master? Also, what about addressing the comment from @stof?

@cordoval
Copy link
Contributor Author

@fabpot rebased

@stof could you please clarify your comment #9719 (comment)?

@fabpot
Copy link
Member

fabpot commented Jun 16, 2014

Any news on this one?

@stof
Copy link
Member

stof commented Jul 9, 2014

👍 The useAttributeAsKey argument is weird, but it is indeed not used for XML either because of the custom normalization done in the tree.

@mdavis1982
Copy link
Contributor

@stof I'm still not sure why this works, to be honest - as I mentioned before, you can set the paths text to anything you like to and it fixes the issue parsing the configuration.

@stof
Copy link
Member

stof commented Jul 9, 2014

@mdavis1982 this is because useAttributeAsKey does 2 things:

  • it tells the processor that the array in the node is a hash, not a list, and so it should preserve keys when merging several arrays together
  • it tells the processor which attribute contains the key for formats which are not able to have the key as a real key (XML being the format needing this).

Because of the custom normalization done on this node, the second behavior is not necessary. But the first behavior (triggered for any non-null values) is still needed

@mdavis1982
Copy link
Contributor

@stof Thanks for the clarification - I think I understand now. Is this PR good to go then?

@stof
Copy link
Member

stof commented Jul 9, 2014

@mdavis1982 from my PoV, yes. but the rules are that 2 deciders need to vote on it, and currently, there is only me in #9719 (comment)

@fabpot
Copy link
Member

fabpot commented Jul 9, 2014

👍

@makasim
Copy link
Contributor

makasim commented Jul 9, 2014

is this going to be merged to master? which means that the fix will be available only for symfony 2.6?

I am using prepend extension feature to make twig aware of some templates that comes with a library. And it would be good to have it fixed in 2.3 too.

@stof
Copy link
Member

stof commented Jul 10, 2014

@makasim nope. As it is a bugfix, it will go in 2.3

@stof
Copy link
Member

stof commented Jul 10, 2014

Thanks for fixing this bug @cordoval.

stof added a commit that referenced this pull request Jul 10, 2014
…cordoval)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #9719).

Discussion
----------

[TwigBundle] fix configuration tree for paths

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8171
| License       | MIT
| Doc PR        | na

This is a joint effort with @mdavis1982 and @cordoval 👶 pairing up and warming for hacking day in Warsaw

Commits
-------

9aa88e4 added regression test
4201d41 fix issue #8171 on configuration tree for twig extension -- pairing up with @cordoval
@stof stof closed this Jul 10, 2014
@mdavis1982
Copy link
Contributor

@stof I actually fixed this bug 😉

@stof
Copy link
Member

stof commented Jul 10, 2014

hmm, indeed. Something to improve in GH when there is several contributors in the PR. curently, it only suggest the names of the PR author for the thank message, and I missed it when merging to change it manually.
so thanks @mdavis1982 as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants