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

fix twig 3.12 compat with failing to detect default function #53

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

sserbin
Copy link
Owner

@sserbin sserbin commented Sep 9, 2024

closes #51

there was a change in getFunctions() between 3.11 and 3.12 - previously it returned array<int, string> and in 3.12 it changed the return format to be indexes by string (fn name) so the code broke a bit.

Simplified the code now to just check for getFunction() instead of relying on the internals of return value - this should work for both 3.11 and 3.12

closes #51

there was a change in getFunctions() between 3.11 and 3.12 - previously
it returned array<int, string> and in 3.12 it changed the return format
to be indexes by string (fn name) so the code broke a bit.

Simplified the code now to just check for getFunction() instead of
relying on the internals of return value - this should work for both 3.11 and 3.12
@sserbin sserbin merged commit 6f9c1b0 into master Sep 9, 2024
@sserbin sserbin deleted the fix-twig-312-undefined-function branch September 9, 2024 16:49
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.

Twig 3.12.0 possible compatibility issue
1 participant