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
Add missing template name and line no to some deprecation messages #3031
Conversation
Wasn't it done on purpose in the past to avoid breaking the grouping @nicolas-grekas ? |
Yes, that's true. The goal is to limit the number of repetitive messages. |
Well, every time this deprecation is triggered, the file+line will be different (at least if you write your templates in a readable way rather than putting them in a single very long line). |
I'm fine with adding the template name only if we want to keep the group per template |
Note that the real problem here is that neither "Show context" nor "Show trace" show the affected template for those deprecation notices, so it's very hard to find which template contains the error. |
Not related, but I've just released a new version of SwiftmailerBundle to get rid of these deprecation notices. |
I think we need to add this information as Twig templates are complied to PHP, so without doing it, it's quite complex to find the usage (at least if you don't know how to use grep :)). So 👍 on my side. |
c54f6af
to
8cd300f
Compare
Thank you @yceruto. |
… messages (yceruto) This PR was merged into the 2.x branch. Discussion ---------- Add missing template name and line no to some deprecation messages before: ![twig-before](https://user-images.githubusercontent.com/2028198/58422946-e1346080-8061-11e9-80e1-b75418fe03e9.png) after: ![twig-after](https://user-images.githubusercontent.com/2028198/58422955-e85b6e80-8061-11e9-9c20-2bbf0ccb5009.png) Commits ------- 8cd300f Add missing template name and line no to some deprecation messages
before:
after: