I'm trying to set up HWIOAuthBundle
to work with FOSUserBundle
.
While making my own User Provider that extends FOSUBUserProvider
, I did the following:
namespace Naroga\Reader\CommonBundle\Service\Security;
use HWI\Bundle\OAuthBundle\Security\Core\User\FOSUBUserProvider;
use HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface;
class NarogaUserProvider extends FOSUBUserProvider {
public function loadUserByOAuthUserResponse(UserResponseInterface $response) {
[...]
}
}
My services.yml is as follows:
naroga.reader.common.security.user_provider:
class: Naroga\Reader\CommonBundle\Service\Security\NarogaUserProvider
arguments: [ @fos_user.user_manager ]
Whenever I run the program, I get the following error:
Argument 2 passed to HWI\Bundle\OAuthBundle\Security\Core\User\FOSUBUserProvider::__construct() must be of the type array, none given, called in
This makes great sense, because FOSUBUserProvider::__construct
's signature is public function __construct(UserManagerInterface $userManager, array $properties)
.
I have no idea what to define as being my second parameter to my service so it can override FOSUBUserProvider
. I've been googling it and all I find is people with the same question, no answers.
I'd be forever grateful to the gentle soul that tells me what the second parameter must be in order to comply with FOSUBUserProvider's signature.
Thank you.