Skip to content
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

Optimized TextNodes have no SourceContext #4045

Open
Lumaraf opened this issue Apr 19, 2024 · 0 comments · May be fixed by #4046
Open

Optimized TextNodes have no SourceContext #4045

Lumaraf opened this issue Apr 19, 2024 · 0 comments · May be fixed by #4046

Comments

@Lumaraf
Copy link
Contributor

Lumaraf commented Apr 19, 2024

TextNode instances created by OptimizerNodeVisitor have no SourceContext set and often the wrong template line which i need for a debugging extension. OPTIMIZE_RAW_FILTER can be turned off, but the print node optimization is always active. Also the check in the constructor currently doesn't include OPTIMIZE_RAW_FILTER and would throw an InvalidArgumentException if only that optimization should be enabled - this can be bypassed by adding something to the bitmask to force negative values though.

Lumaraf added a commit to Lumaraf/Twig that referenced this issue Apr 19, 2024
@Lumaraf Lumaraf linked a pull request Apr 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant