[TwigComponent] Add support for anonymous component name resolution in other bundle#3295
Conversation
1e75f59 to
0e77a6a
Compare
|
Hi @Phil23 Could you add a few tests for the edge cases... that will mainly be used to decide once and keep the same behaviour afterward. <twig:Acme:Foo:Index />
<twig:Acme:Foo:index />
<twig:Acme:Index:index />
( depending on the various possibilities (there is or not a template, caps / lower) ) Also let's add a line in the CHANGELOG (the one in the src/TwigComponent directory) Minor/personal note here: this will work (and thank you for this PR by the way 🤝 ).. ... I would still not recommand "officially" this trick to bundle maintainers.. or I would recommand them to not abuse it, and keep it "inside" their component structure instead of using this for the "main ones" -- button for instance.. |
|
@smnandre Thank you for the feedback. I added several edge cases to the unit test. I also added the changelog entry. I wasn't sure about the version number, though. |
|
Thank you for this nice first PR @Phil23 🎉 |
e121b9d to
fe1d716
Compare
…n external bundle Co-authored-by: Simon André <smn.andre@gmail.com>
fe1d716 to
2f2c53e
Compare
|
Thank you @Phil23. |
In a recent PR (#3169), @andyexeter added support for using
index.html.twigas a component template when the component is placed in a directory named after itself. However, it seems to miss the implementation for external bundles. This PR extends the change so that anonymous component templates in other bundles can also use this naming pattern.