public function loadUserByOAuthUserResponse(UserResponseInterface $response)
{
$em = $this->getDoctrine()->getManager();
}
然后我收到以下错误消息:
在FOSUBUserProvider
中找不到错误方法getDoctrine()
答案 0 :(得分:0)
your.service_id: class:Acme \ DemoBundle \ Timesheet 参数:[@ doctrine]
私人$ doctrine;
/**
* @param Registry $doctrine Doctrine
*/
public function __construct(Registry $doctrine)
{
$this->doctrine = $doctrine;
}
public function yourMethod()
{
$this->doctrine->getRepository('UtilisateurBundle:compte')->find('1');
}