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

synchronize sourceContext #4050

Merged
merged 1 commit into from
Apr 27, 2024
Merged

Conversation

Lumaraf
Copy link
Contributor

@Lumaraf Lumaraf commented Apr 24, 2024

I have some debugging extensions that need the template name from various nodes in a NodeVisitor. Currently this is guaranteed for the nodes created from parsing the template. This ensures that the SourceContext is also set for nodes created by NodeVisitors modifying the node tree.

I am not sure if it is a good idea to always set the SourceContext on a child node or if this should only set it if it is not set.

src/Node/Node.php Outdated Show resolved Hide resolved
@fabpot
Copy link
Contributor

fabpot commented Apr 27, 2024

Thank you @Lumaraf.

@fabpot fabpot merged commit 57a9cdb into twigphp:3.x Apr 27, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants