Skip to content

Twig v1.26.0 breaks auth_user() #283

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

Open
pinodex opened this issue Oct 5, 2016 · 7 comments
Open

Twig v1.26.0 breaks auth_user() #283

pinodex opened this issue Oct 5, 2016 · 7 comments

Comments

@pinodex
Copy link

pinodex commented Oct 5, 2016

I recently updated from Twig v1.24.2 to Twig v1.26.0. Now, everytime I made a call to auth_user() in my Twig template, I am getting

An exception has been thrown during the compilation of a template ("Method Illuminate\Auth\AuthManager::user() does not exist")

Method Illuminate\Auth\AuthManager::user() does not exist (Twig/Node/Expression/Call.php line 262)

Digging, v1.26.0 introduced a reflectCallable method which does not exist in v1.24.2.

I tried calling new ReflectionMethod($callable[0], $callable[1]); alone and it produces the same error. However, call_user_func_array($callable); works.

I don't know where to submit this issue. Any suggestions on resolving this?

@andmetoo
Copy link

andmetoo commented Oct 5, 2016

you can read this threads
#281 #282

@Rjs37
Copy link

Rjs37 commented Oct 5, 2016

@barryvdh Could we get this fix tagged with a release? Until it is, the issue will just keep getting re-reported when people do their composer updates.

@barryvdh
Copy link
Collaborator

barryvdh commented Oct 5, 2016

Twig should probably tag a new release, which broke it in the first place..

@Rjs37
Copy link

Rjs37 commented Oct 5, 2016

Sorry Barry, didn't see that they've also made a fix for the issue.
For those who want to stay informed: twigphp/Twig#2161

Hopefully they'll accept the pull request and tag it shortly.

@mbardelmeijer
Copy link
Contributor

Twig v1.26.1 has been released with the nessesary fix 🎉

@pinodex
Copy link
Author

pinodex commented Oct 24, 2016

Is this already fixed? I am now getting

Twig_Error_Runtime in Environment.php line 822
The "Symfony\Bridge\Twig\Extension\FormExtension" extension is not enabled

after a composer update to twig/twig v1.26.1 and symfony/twig-bridge v3.1.5.

@barryvdh
Copy link
Collaborator

I also encountered that, not sure why though

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

No branches or pull requests

5 participants