-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
twig 2 not works with debug panel #21212
Comments
Twig_SimpleFilter is not removed from Twig 2. So saying you have an error because of it looks weird. and Twig_Function_Method is not used anymore in Symfony, so it probably comes from your own code or from a third-party bundle (and this class is indeed removed in Twig 2, as it was deprecated in Twig 1.x since some time) |
this came from TwigBundle |
But this filter is defined in Symfony, so it looks weird |
I got the same error a few days ago and it was because of a definition issue in my code. I will try to replicate to see how we can get a better error message in this case. |
So that is my project update issue. My project started on symfony 3.0.0
my composer.json |
so there only
added on top of original |
Issue arise when I add custom extension:
|
Can you show the output of |
AleksandrssiMac:front alex$ composer show -i |grep twig |
Error page
|
the Twig_Error_Syntax looks related to the initial error in The original issue is that your @fabpot do you have an idea to ensure that exceptions during the extension initialization does not break the exception controller ? May it be solved by moving |
thanks @stof Right
fix bug so this is my bug not symfony but error yes weird |
you can even remove the |
True. Tested it. Works. Thanks @stof |
…ne (stof) This PR was merged into the 1.x branch. Discussion ---------- Delay marking the environment as initialized until it is done This avoids breaking the symfony exception page rendering saying that filters are not available due to a partial initialization: symfony/symfony#21212 It would report the initialization error instead. Commits ------- a33fb6c Delay marking the environment as initialized until it is done
…tof) This PR was merged into the 2.x branch. Discussion ---------- Typehint the function, filter and test names as string This gives faster feedback when using the class in a wrong way, instead of getting a ``Warning: Illegal offset type in ExtensionSet.php line 434`` during the function registration (see symfony/symfony#21212 for a case getting this message) Commits ------- 2b4642c Typehint the function, filter and test names as string
Thank you very much. This approach solved my problem. |
Have issues with twig 2. It not works with debug panel
just do composer update on standard project from symfony 3.2.1
and I have errors with my Twig services because
Twig_Function_Method
andTwig_SimpleFilter
removed from Twig. Fixed when change toTwig_Function
andTwig_Filter
The text was updated successfully, but these errors were encountered: