Skip to content

Conversation

gharlan
Copy link
Contributor

@gharlan gharlan commented Jun 30, 2025

My twig function/filter methods are often private. But when using the new attributes, they have to be public.

@samsonasik
Copy link
Member

Could you add reference when it must be public?

@gharlan
Copy link
Contributor Author

gharlan commented Jun 30, 2025

Could you add reference when it must be public?

They must be public when using the attributes, because they are called directly from the outside.
Private methods with AsTwigFilter or AsTwigFunction are ignored.

@TomasVotruba
Copy link
Member

I see. Thanks for the description and the fix @gharlan 👍

@TomasVotruba TomasVotruba merged commit c144f25 into rectorphp:main Jun 30, 2025
5 checks passed
@gharlan gharlan deleted the twig-methods-public branch June 30, 2025 09:56
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.

3 participants