{"action":"created","issue":{"url":"https://api.github.com/repos/phpstan/phpstan-doctrine/issues/31","repository_url":"https://api.github.com/repos/phpstan/phpstan-doctrine","labels_url":"https://api.github.com/repos/phpstan/phpstan-doctrine/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/phpstan/phpstan-doctrine/issues/31/comments","events_url":"https://api.github.com/repos/phpstan/phpstan-doctrine/issues/31/events","html_url":"https://github.com/phpstan/phpstan-doctrine/issues/31","id":342849860,"node_id":"MDU6SXNzdWUzNDI4NDk4NjA=","number":31,"title":"Feature request: Checking type hint of fields against Doctrine metadata","user":{"login":"arnaud-lb","id":365207,"node_id":"MDQ6VXNlcjM2NTIwNw==","avatar_url":"https://avatars3.githubusercontent.com/u/365207?v=4","gravatar_id":"","url":"https://api.github.com/users/arnaud-lb","html_url":"https://github.com/arnaud-lb","followers_url":"https://api.github.com/users/arnaud-lb/followers","following_url":"https://api.github.com/users/arnaud-lb/following{/other_user}","gists_url":"https://api.github.com/users/arnaud-lb/gists{/gist_id}","starred_url":"https://api.github.com/users/arnaud-lb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arnaud-lb/subscriptions","organizations_url":"https://api.github.com/users/arnaud-lb/orgs","repos_url":"https://api.github.com/users/arnaud-lb/repos","events_url":"https://api.github.com/users/arnaud-lb/events{/privacy}","received_events_url":"https://api.github.com/users/arnaud-lb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-19T18:58:00Z","updated_at":"2018-07-20T09:38:58Z","closed_at":null,"author_association":"NONE","body":"phpstan-doctrine could check if a field's typehint matches Doctrine's metadata.\r\n\r\nIn the following example, the plugin could emit a warning telling that `int` does not match `string`:\r\n```\r\n/**\r\n * @var int\r\n *\r\n * @Column(type=\"string\")\r\n */\r\n private $var;\r\n```\r\n\r\nIn the following examples, the plugin could emit a warning telling that the field is nullable:\r\n\r\n```\r\n/**\r\n * @var int // Should be nullable\r\n *\r\n * @Column(type=\"integer\", nullable=true)\r\n */\r\n private $var;\r\n\r\n/**\r\n * @var Foo // Should be nullable\r\n *\r\n * @OneToOne(targetEntity=\"Foo\")\r\n```"},"comment":{"url":"https://api.github.com/repos/phpstan/phpstan-doctrine/issues/comments/406546998","html_url":"https://github.com/phpstan/phpstan-doctrine/issues/31#issuecomment-406546998","issue_url":"https://api.github.com/repos/phpstan/phpstan-doctrine/issues/31","id":406546998,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjU0Njk5OA==","user":{"login":"ondrejmirtes","id":104888,"node_id":"MDQ6VXNlcjEwNDg4OA==","avatar_url":"https://avatars0.githubusercontent.com/u/104888?v=4","gravatar_id":"","url":"https://api.github.com/users/ondrejmirtes","html_url":"https://github.com/ondrejmirtes","followers_url":"https://api.github.com/users/ondrejmirtes/followers","following_url":"https://api.github.com/users/ondrejmirtes/following{/other_user}","gists_url":"https://api.github.com/users/ondrejmirtes/gists{/gist_id}","starred_url":"https://api.github.com/users/ondrejmirtes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ondrejmirtes/subscriptions","organizations_url":"https://api.github.com/users/ondrejmirtes/orgs","repos_url":"https://api.github.com/users/ondrejmirtes/repos","events_url":"https://api.github.com/users/ondrejmirtes/events{/privacy}","received_events_url":"https://api.github.com/users/ondrejmirtes/received_events","type":"User","site_admin":false},"created_at":"2018-07-20T09:38:58Z","updated_at":"2018-07-20T09:38:58Z","author_association":"MEMBER","body":"It'd be cool to have it a part of phpstan-doctrine as rules.neon."}}
{"actor":{"display_login":"ondrejmirtes"}}