I tried to extend the UserManager of FOS according to this link
My service is correctly detected but i have an error i can't resolved :
ErrorException: Catchable Fatal Error: Argument 1 passed to FOS\UserBundle\Entity\UserManager::__construct() must be an instance of Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface, none given, called in
MyUserManager :
namespace ChoupsCommerce\UserBundle\Model;
use FOS\UserBundle\Entity\UserManager;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
class MyUserManager extends UserManager
{
public function loadUserByUsername($username)
{
$user = $this->findUserByUsernameOrEmail($username);
if (!$user) {
throw new UsernameNotFoundException(sprintf('No user with name "%s" was found.', $username));
}
return $user;
}
}