{"action":"opened","issue":{"url":"https://api.github.com/repos/doctrine/doctrine2/issues/7271","repository_url":"https://api.github.com/repos/doctrine/doctrine2","labels_url":"https://api.github.com/repos/doctrine/doctrine2/issues/7271/labels{/name}","comments_url":"https://api.github.com/repos/doctrine/doctrine2/issues/7271/comments","events_url":"https://api.github.com/repos/doctrine/doctrine2/issues/7271/events","html_url":"https://github.com/doctrine/doctrine2/issues/7271","id":335025259,"node_id":"MDU6SXNzdWUzMzUwMjUyNTk=","number":7271,"title":"automatic discriminator discovery not namespace aware","user":{"login":"delboy1978uk","id":2684575,"node_id":"MDQ6VXNlcjI2ODQ1NzU=","avatar_url":"https://avatars0.githubusercontent.com/u/2684575?v=4","gravatar_id":"","url":"https://api.github.com/users/delboy1978uk","html_url":"https://github.com/delboy1978uk","followers_url":"https://api.github.com/users/delboy1978uk/followers","following_url":"https://api.github.com/users/delboy1978uk/following{/other_user}","gists_url":"https://api.github.com/users/delboy1978uk/gists{/gist_id}","starred_url":"https://api.github.com/users/delboy1978uk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delboy1978uk/subscriptions","organizations_url":"https://api.github.com/users/delboy1978uk/orgs","repos_url":"https://api.github.com/users/delboy1978uk/repos","events_url":"https://api.github.com/users/delboy1978uk/events{/privacy}","received_events_url":"https://api.github.com/users/delboy1978uk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-22T21:31:36Z","updated_at":"2018-06-22T21:31:36Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Bug Report\r\n\r\n<!-- Fill in the relevant information below to help triage your issue. -->\r\n\r\n|    Q        |   A\r\n|------------ | ------\r\n| BC Break    | no\r\n| Version     | latest\r\n\r\n#### Summary\r\n\r\n<!-- Provide a summary desciribing the problem you are experiencing. -->\r\n\r\n#### Current behavior\r\n\r\nRight now there has been one PR closed, and 2 still open for a `@DiscriminatorValue` since the entire discriminator map currently needs to go into the base class, which means extending classes in a different package will not work with it.\r\n\r\nCurrently we have an automatic discriminator map, just by removing the annotation. However, two classes with the same name regardless of the namespace will not work.\r\n\r\n#### How to reproduce\r\n\r\n```php\r\n<?php\r\n\r\nnamespace Del\\Entity;\r\n\r\nuse Doctrine\\ORM\\Mapping as ORM;\r\n\r\n/**\r\n * @ORM\\Entity(repositoryClass=\"Del\\Repository\\UserRepository\")\r\n * @ORM\\Table(name=\"User\",uniqueConstraints={@ORM\\UniqueConstraint(name=\"email_idx\", columns={\"email\"})})\r\n * @ORM\\InheritanceType(\"SINGLE_TABLE\")\r\n * @ORM\\DiscriminatorColumn(name=\"class\", type=\"string\")\r\n */\r\nclass User \r\n{\r\n // code\r\n}\r\n```\r\nthen try and extend it with another User class in a different namespace:\r\n\r\n```php\r\n<?php\r\n\r\nnamespace OAuth;\r\n\r\nuse Del\\Entity\\User as BaseUser;\r\nuse Doctrine\\ORM\\Mapping as ORM;\r\nuse League\\OAuth2\\Server\\Entities\\UserEntityInterface;\r\n\r\n/**\r\n * @ORM\\Entity(repositoryClass=\"OAuth\\Repository\\UserRepository\")\r\n */\r\nclass User extends BaseUser implements UserEntityInterface\r\n{\r\n  // code\r\n}\r\n```\r\n#### Expected behavior\r\nMigrations will generate.\r\n\r\n\r\n"}}
{"actor":{"display_login":"delboy1978uk"}}