{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony-docs/issues/5279","labels_url":"https://api.github.com/repos/symfony/symfony-docs/issues/5279/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony-docs/issues/5279/comments","events_url":"https://api.github.com/repos/symfony/symfony-docs/issues/5279/events","html_url":"https://github.com/symfony/symfony-docs/issues/5279","id":78987904,"number":5279,"title":" Creating the custom Voter","user":{"login":"colejarczyk","id":3582562,"avatar_url":"https://avatars.githubusercontent.com/u/3582562?v=3","gravatar_id":"","url":"https://api.github.com/users/colejarczyk","html_url":"https://github.com/colejarczyk","followers_url":"https://api.github.com/users/colejarczyk/followers","following_url":"https://api.github.com/users/colejarczyk/following{/other_user}","gists_url":"https://api.github.com/users/colejarczyk/gists{/gist_id}","starred_url":"https://api.github.com/users/colejarczyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colejarczyk/subscriptions","organizations_url":"https://api.github.com/users/colejarczyk/orgs","repos_url":"https://api.github.com/users/colejarczyk/repos","events_url":"https://api.github.com/users/colejarczyk/events{/privacy}","received_events_url":"https://api.github.com/users/colejarczyk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/symfony/symfony-docs/labels/Actionable","name":"Actionable","color":"02e10c"},{"url":"https://api.github.com/repos/symfony/symfony-docs/labels/Easy%20pick","name":"Easy pick","color":"d7e102"},{"url":"https://api.github.com/repos/symfony/symfony-docs/labels/Security","name":"Security","color":"DDDDDD"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-05-21T13:06:09Z","updated_at":"2015-05-23T16:48:26Z","closed_at":null,"body":"This is a small thing. In Voter example $user object is an instance of Symfony\\Component\\Security\\Core\\User\\UserInterface. Then in a switch statement there is a call to method getId() on $user, but there is no such method in UserInterface."},"comment":{"url":"https://api.github.com/repos/symfony/symfony-docs/issues/comments/104923791","html_url":"https://github.com/symfony/symfony-docs/issues/5279#issuecomment-104923791","issue_url":"https://api.github.com/repos/symfony/symfony-docs/issues/5279","id":104923791,"user":{"login":"weaverryan","id":121003,"avatar_url":"https://avatars.githubusercontent.com/u/121003?v=3","gravatar_id":"","url":"https://api.github.com/users/weaverryan","html_url":"https://github.com/weaverryan","followers_url":"https://api.github.com/users/weaverryan/followers","following_url":"https://api.github.com/users/weaverryan/following{/other_user}","gists_url":"https://api.github.com/users/weaverryan/gists{/gist_id}","starred_url":"https://api.github.com/users/weaverryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaverryan/subscriptions","organizations_url":"https://api.github.com/users/weaverryan/orgs","repos_url":"https://api.github.com/users/weaverryan/repos","events_url":"https://api.github.com/users/weaverryan/events{/privacy}","received_events_url":"https://api.github.com/users/weaverryan/received_events","type":"User","site_admin":false},"created_at":"2015-05-23T16:48:26Z","updated_at":"2015-05-23T16:48:26Z","body":"@iltar Why should someone make their business logic only rely on `UserInterface`? If we extend that argument, then when calling `$this->getUser()` in a controller, we should also only rely on the `UserInterface` methods."}}