Skip to content

Conversation

jtallant
Copy link
Contributor

@jtallant jtallant commented Apr 19, 2024

Merging this allows the package to run on Twig version 3.9. twig_get_attribute was moved to an internal function by twig so we can no longer directly call it.

Fixes #440

@rudiedirkx
Copy link
Contributor

GetAttrNode::attribute() is executed A LOT on every page. Is repeating function_exists() fast enough? We only have to do that once? I can imagine PHP has to do some lookup everytime it's called.

@jtallant
Copy link
Contributor Author

Not sure about that. I suppose we can just not check if the function exists and just return the call to Core. Either way this package doesn't work with 3.9 until this is merged.

@barryvdh
Copy link
Collaborator

Can we just bump the Twig requirement and skip the check? Not sure which version includes it, but if we use that version, we can just remove the old function.

@barryvdh barryvdh merged commit e0b2b67 into rcrowe:master Apr 24, 2024
@barryvdh barryvdh mentioned this pull request Apr 24, 2024
@willrowe
Copy link
Contributor

willrowe commented Oct 8, 2024

This just bit me pretty bad and caused a crash in production. I was on an older version of this package and updated twig/twig due to a security vulnerability. Since the version constraint for twig/twig on the older version allowed all minor versions of v3, it updated without any kind of warning.

I'm not sure if this is even possible, but can previous versions be constrained to only versions before v3.9 of twig.twig?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TwigBridge 0.14.* not compatible with Twig 3.9.0
4 participants