Fosuserbundle: Problem with fosOauthServerBundle

Created on 11 Oct 2016  路  10Comments  路  Source: FriendsOfSymfony/FOSUserBundle

Hi folsk,

i have a project with FosUserBundle and FOSOauthServerBundle:

"friendsofsymfony/oauth-server-bundle": "^1.5", "friendsofsymfony/user-bundle": "~2.0@dev",

After the last upgrade i have this error:
Argument 5 passed to FOS\OAuthServerBundle\Storage\OAuthStorage::__construct() must implement interface Symfony\Component\Security\Core\User\UserProviderInterface, instance of FOS\UserBundle\Doctrine\UserManager given

caused by https://github.com/FriendsOfSymfony/FOSUserBundle/commit/f7a1f513753517601e94a0c208fdf8d24d1b85ce

Can someone help me?

Most helpful comment

This helped me:

user_provider: fos_user.user_provider.username

All 10 comments

this is because using the fos_user.user_manager as a UserProvider was deprecated since a long time, and we finally got rid of the deprecated code. Inject the actual user provider instead

Yeah! I checked it just 1 minutes after my post.

Tnx

This helped me:

user_provider: fos_user.user_provider.username

@vaziuok , thank you very much.

fos_user.user_provider.username works like a charm for me. Thx very much! Saved my day

+1

user_provider: fos_user.user_provider.username

thanks !

Thanks it worked for me

Or:

    providers:
        fos_userbundle:
            id: fos_user.user_provider.username

Yes, i confirm this solution ! check it out https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Upgrade.md#user-provider Thank you @stof

@erikassojunovas thank you

Was this page helpful?
0 / 5 - 0 ratings