knpuniversity / oauth2-client-bundle

Easily talk to an OAuth2 server for social functionality in Symfony
https://symfonycasts.com
MIT License
787 stars 145 forks source link

Attempted to load class "AbstractGuardAuthenticator" #380

Closed Ben-Meziani closed 2 years ago

Ben-Meziani commented 2 years ago

I've got this error and I don't know how to fix it :

Attempted to load class "AbstractGuardAuthenticator" from namespace "Symfony\Component\Security\Guard". Did you forget a "use" statement for another namespace?

It seems like "AbstractGuardAuthenticator" is deprecated with symfony 6 and I don't know what to use instead of it.

weaverryan commented 2 years ago

Hey @Ben-Meziani!

Yes, Guard is gone in Symfony 6. Use the new "authenticator" described in the section right about Guard in the docs - https://github.com/knpuniversity/oauth2-client-bundle#authenticating-with-the-new-symfony-authenticator

Cheers!