-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
This is what the documentation says now:
As of Twig 2.9, you should use the apply tag instead which does the same thing except that the wrapped template data is not scoped.
This was not the case before Twig 2.9: neither the documentation nor the test suite did say anything about the fact that the filter tag creates a new context scope. The documentation and the test were added on April 2019 (this commit: 619bc12).
Prior to that, the filter tag was not supposed to create a new scope. But it did on TwigPHP prior to 2.9. Which means that TwigPHP filter tag implementation was faulty.
Then, with TwigPHP 2.9, instead of fixing the bug, you have updated the documentation and added a test! Which is a breaking change.
Let me summarize:
- The specifications don't say anything about the fact that the
filtertag creates a new context scope - TwigPHP
filtertag implementation creates a new context scope, which is a bug - Suddenly, you decide to change the specifications to match the faulty implementation of TwigPHP
What is the rational behind that behavior? Is it assumed at Twig, SensioLabs or whatever entity is behing Twig specifications that when TwigPHP is faulty, then it is not faulty? How are other Twig implementations supposed to guess what is a faulty behavior if the documentation and the test suite can't be used as reference?
Bonus question: when will you release the language specifications publicly?