1. my_user_provider:
  2. class: AppBundle\User\FOSUBUserProvider
  3. public: public
  4. #this is the place where the properties are passed to the UserProvider - see config.yml
  5. arguments:
  6. - '@fos_user.user_manager'
  7. - {facebook: facebook_id, google: google_id}



  1. [Symfony\Component\DependencyInjection\Exception\AutowiringFailedException]
  2. Cannot autowire service "AppBundle\User\FOSUBUserProvider": argument "$properties" of method "HWI\Bundle\OAuthBundle\Security\Core\User\FOSUBUserProvider::__construct()" must have a type-hint
  3. or be given a value explicitly.


Problem tyczy sie 2 argumentu tongue.gif pewnie jest banalny ale nie wiem jak mam to zrobić.

Czytałem, że powinno wyglądać to w ten sposób:

  1. $properties: {facebook: facebook_id, google: google_id}


Ale wtedy nie wiem jak zapisać pierwszy argument sad.gif

Odwołuj się to do:

  1. public function __construct(UserManagerInterface $userManager, array $properties)
  2. {
  3. parent::__construct($userManager, $properties);
  4. }