-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Custom tag compiler no longer works #4090
Comments
The problem in your code is that you're using the |
Unfortunately your implementation relies on output buffering, which is not used anymore internally. |
@nicolas-grekas so, if using |
Using CaptureNode I suppose? |
There is no CaptureNode in Twig 3.8. So, if |
Ah OK, so yes, ob_start was the way to go. Note that I'm just trying to help. Yes, we could consider some BC break here. Unfortunately, that's the kind if low-level stuff that's really hard to deal with. Twig needs to move forward and using yield makes it way better. Some extensions do need to adapt, that's true. |
I used SetNode Chi-teck/drupal-code-generator@89a6b47#diff-659f570da976dbf4397a186b8703135e6aad1de658e365e4dd882d8bf06336d5R36 It not be the best solution, but maybe it will be useful for someone. BTW I think we will abandon the tag in favor of a filter |
That's why major version bump exists. There is no reason not to having pushed a new major version here. |
@nicolas-grekas any handy documentation / link / example of this 'CaptureNode' thing? |
I have a compiler for custom tag that is using output buffer. It worked well for years until Twig 3.9.0 was released.
Apparently there was some regression introduced in #3999.
The text was updated successfully, but these errors were encountered: