{"action":"created","issue":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/issues/2291","repository_url":"https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle","labels_url":"https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/issues/2291/labels{/name}","comments_url":"https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/issues/2291/comments","events_url":"https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/issues/2291/events","html_url":"https://github.com/FriendsOfSymfony/FOSUserBundle/issues/2291","id":185090912,"number":2291,"title":"UserManager overriding methods ","user":{"login":"bgoncalvesdev","id":3133977,"avatar_url":"https://avatars.githubusercontent.com/u/3133977?v=3","gravatar_id":"","url":"https://api.github.com/users/bgoncalvesdev","html_url":"https://github.com/bgoncalvesdev","followers_url":"https://api.github.com/users/bgoncalvesdev/followers","following_url":"https://api.github.com/users/bgoncalvesdev/following{/other_user}","gists_url":"https://api.github.com/users/bgoncalvesdev/gists{/gist_id}","starred_url":"https://api.github.com/users/bgoncalvesdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgoncalvesdev/subscriptions","organizations_url":"https://api.github.com/users/bgoncalvesdev/orgs","repos_url":"https://api.github.com/users/bgoncalvesdev/repos","events_url":"https://api.github.com/users/bgoncalvesdev/events{/privacy}","received_events_url":"https://api.github.com/users/bgoncalvesdev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-25T11:34:33Z","updated_at":"2016-11-18T15:19:17Z","closed_at":null,"body":"hi, \nI have my own UserManager which overide several  FOS...\\UserManager methods and i get into a little issue. \nI cannot access the new canonicalFieldsUpdater property as it's private in the abstract FOS\\UserBundle\\Model\\UserManager but I need to access it in my own UseManager.\nI can bypass it quick with my own __construct but this look a little \"dirty\" as I could simply access the property if it was protected in parent's class instead ?\n\nexemple with my own manager.\n\n```\n\n<?php\nnamespace Demo\\UserBundle\\Manager;\n\nuse FOS\\UserBundle\\Doctrine\\UserManager as BaseUserManager;\n/*...*/\n\nclass UserManager extends BaseUserManager\n{\n    private $canonicalFieldsUpdater;  //had to fix it like this but could be avoid if it was protected in parent class\n\n    public function __construct(PasswordUpdaterInterface $passwordUpdater, CanonicalFieldsUpdater $canonicalFieldsUpdater, ObjectManager $om, $class)\n    {\n       parent::__construct($passwordUpdater, $canonicalFieldsUpdater, $om, $class);\n        $this->canonicalFieldsUpdater = $canonicalFieldsUpdater; //had to fix it like this but could be avoid if it was protected in parent class\n    }\n\n    /*....*/\n\n    private function getInitalQb()\n    {\n        return $this->repository->createQueryBuilder('u')\n                        ->addSelect('p')\n                        ->addSelect('i')\n                        ->leftJoin('u.profile', 'p')\n                        ->leftJoin('p.image', 'i');\n    }\n\n    public function findUserByEmail($email)\n    {\n        $qb = $this->getInitalQb();\n        return $qb\n                        ->where('u.emailCanonical = :emailCanonical')\n                        ->setParameter('emailCanonical', $this->canonicalFieldsUpdater->canonicalizeEmail($email))\n                        ->getQuery()\n                        ->getOneOrNullResult();\n    }\n}\n```\n"},"comment":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/issues/comments/261556783","html_url":"https://github.com/FriendsOfSymfony/FOSUserBundle/issues/2291#issuecomment-261556783","issue_url":"https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/issues/2291","id":261556783,"user":{"login":"XWB","id":1032281,"avatar_url":"https://avatars.githubusercontent.com/u/1032281?v=3","gravatar_id":"","url":"https://api.github.com/users/XWB","html_url":"https://github.com/XWB","followers_url":"https://api.github.com/users/XWB/followers","following_url":"https://api.github.com/users/XWB/following{/other_user}","gists_url":"https://api.github.com/users/XWB/gists{/gist_id}","starred_url":"https://api.github.com/users/XWB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XWB/subscriptions","organizations_url":"https://api.github.com/users/XWB/orgs","repos_url":"https://api.github.com/users/XWB/repos","events_url":"https://api.github.com/users/XWB/events{/privacy}","received_events_url":"https://api.github.com/users/XWB/received_events","type":"User","site_admin":false},"created_at":"2016-11-18T15:19:17Z","updated_at":"2016-11-18T15:19:17Z","body":"@bgoncalvesdev Can you check if https://github.com/FriendsOfSymfony/FOSUserBundle/pull/2306 would do the job or did you find another solution to resolve this issue?"}}
{"actor":{"display_login":"XWB"}}