{"action":"created","issue":{"url":"https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/issues/335","repository_url":"https://api.github.com/repos/sensiolabs/SensioGeneratorBundle","labels_url":"https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/issues/335/labels{/name}","comments_url":"https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/issues/335/comments","events_url":"https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/issues/335/events","html_url":"https://github.com/sensiolabs/SensioGeneratorBundle/issues/335","id":57393694,"number":335,"title":"DoctrineEntityGenerator fails for entities outside bundles","user":{"login":"davidgorges","id":3885619,"avatar_url":"https://avatars0.githubusercontent.com/u/3885619?v=4","gravatar_id":"","url":"https://api.github.com/users/davidgorges","html_url":"https://github.com/davidgorges","followers_url":"https://api.github.com/users/davidgorges/followers","following_url":"https://api.github.com/users/davidgorges/following{/other_user}","gists_url":"https://api.github.com/users/davidgorges/gists{/gist_id}","starred_url":"https://api.github.com/users/davidgorges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidgorges/subscriptions","organizations_url":"https://api.github.com/users/davidgorges/orgs","repos_url":"https://api.github.com/users/davidgorges/repos","events_url":"https://api.github.com/users/davidgorges/events{/privacy}","received_events_url":"https://api.github.com/users/davidgorges/received_events","type":"User","site_admin":false},"labels":[{"id":237005756,"url":"https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/labels/Bug","name":"Bug","color":"e11d21","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2015-02-11T23:23:32Z","updated_at":"2017-09-14T07:44:03Z","closed_at":null,"author_association":"NONE","body":"DoctrineEntityGenerator tries to get a bundle from the shortcut notation but doesn't check whether the entity is inside a bundle or not.\n\ne.g.:\n\n``` yaml\n    orm:\n        auto_generate_proxy_classes: \"%kernel.debug%\"\n        auto_mapping: true\n        mappings:\n          CustomEntity:\n            mapping: true\n            type: annotation\n            dir: %kernel.root_dir%/../src/Custom/Model/\n            prefix: Custom\\Model\n            alias: Custom\n            is_bundle: false\n```\n\n```\nphp app/console generate:doctrine:form Custom:State\n```\n\nraises an error:\n\n```\n[InvalidArgumentException]\n Bundle \"Custom\" does not exist or it is not enabled. Maybe you forgot to add it in the \n registerBundles() method of your AppKernel.php file\n```\n"},"comment":{"url":"https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/issues/comments/329401398","html_url":"https://github.com/sensiolabs/SensioGeneratorBundle/issues/335#issuecomment-329401398","issue_url":"https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/issues/335","id":329401398,"user":{"login":"chapterjason","id":1337562,"avatar_url":"https://avatars2.githubusercontent.com/u/1337562?v=4","gravatar_id":"","url":"https://api.github.com/users/chapterjason","html_url":"https://github.com/chapterjason","followers_url":"https://api.github.com/users/chapterjason/followers","following_url":"https://api.github.com/users/chapterjason/following{/other_user}","gists_url":"https://api.github.com/users/chapterjason/gists{/gist_id}","starred_url":"https://api.github.com/users/chapterjason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chapterjason/subscriptions","organizations_url":"https://api.github.com/users/chapterjason/orgs","repos_url":"https://api.github.com/users/chapterjason/repos","events_url":"https://api.github.com/users/chapterjason/events{/privacy}","received_events_url":"https://api.github.com/users/chapterjason/received_events","type":"User","site_admin":false},"created_at":"2017-09-14T07:44:03Z","updated_at":"2017-09-14T07:44:03Z","author_association":"NONE","body":"While working with `symfony flex` I noticed that here something should really happen. While trying to generate a Entity I got the following.\r\n\r\n```\r\n> php bin/console doctrine:generate:entity --entity=MyBundle:Article --format=annotation\r\n\r\n  [InvalidArgumentException]\r\n  Bundle \"MyBundle\" does not exist or it is not enabled.\r\n\r\n```"}}
{"actor":{"display_login":"chapterjason"}}