-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Use native Twig references for templates #9726
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
wadjeroudi
commented
Sep 24, 2018
| Q | A |
|---|---|
| Branch? | master |
| Bug fix? | yes |
| New feature? | yes |
| BC breaks? | yes |
| Deprecations? | no |
| Related tickets | fixes #9719 |
| License | MIT |
| 'filter' => [ | ||
| 'string' => 'AppBundle:Grid/Filter:string.html.twig', | ||
| 'date' => 'AppBundle:Grid/Filter:date.html.twig', | ||
| 'string' => 'Grid/Filter/string.html.twig', |
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.
It's a test, but I guess there's @ missing in the beginning.
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.
It was on purpose, you can't use @app. Not totally sure if it's the correct value.
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.
Ah yeah, you're right! :)
|
LGTM apart from the answer for the "BC breaks?" question, what exactly is a BC break here? |
f549ece to
209f6a9
Compare
|
@pamil do you know why behat suite didn't pass ? I can't spot the mistaske. |
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.
@wadjeroudi I think I found why Behat is failing
| {{ sonata_block_render_event('sylius.shop.checkout.complete.before_summary', {'order': order, 'form': form}) }} | ||
|
|
||
| {% include 'SyliusShopBundle:Common/Order:_summary.html.twig' %} | ||
| {% include '@SyliusShop/Common/Order/' %} |
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.
Something went wrong here :)
|
|
I don't see any problem with using the "new" syntax in the docs. In fact, it's not new and already supported since Twig 2.0? |
| section: admin | ||
| path: users | ||
| templates: SyliusAdminBundle:Crud | ||
| templates: "@SyliusAdmin\\Crud" |
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.
I thought it should be a forward slash, not a backslash?
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.
@teohhanhui took me a while to figure it out, the / does escape the content of the route. Tried a lot of combination.
The only working solution (tested) was that.
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.
I think it might be connected with symfony/symfony#23412.
|
@teohhanhui I'm not opposed, just maybe if we replace, we should add a documentation that explains clearly the two structures and how to override (even if it's a common symfony practice) ? |
pamil
left a comment
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.
Amazing job, thanks a lot! 🎉
|
Rebased the PR to 1.3 branch. |
|
Thank you, @wadjeroudi and @teohhanhui! 🎉 |