{"action":"created","issue":{"url":"https://api.github.com/repos/symfony2admingenerator/GeneratorBundle/issues/288","repository_url":"https://api.github.com/repos/symfony2admingenerator/GeneratorBundle","labels_url":"https://api.github.com/repos/symfony2admingenerator/GeneratorBundle/issues/288/labels{/name}","comments_url":"https://api.github.com/repos/symfony2admingenerator/GeneratorBundle/issues/288/comments","events_url":"https://api.github.com/repos/symfony2admingenerator/GeneratorBundle/issues/288/events","html_url":"https://github.com/symfony2admingenerator/GeneratorBundle/issues/288","id":157683796,"number":288,"title":"Possible bug in Admingenerator\\GeneratorBundle\\DependencyInjection\\AdmingeneratorGeneratorExtension::registerFormsServicesFromGenerator","user":{"login":"TheCelavi","id":410738,"avatar_url":"https://avatars.githubusercontent.com/u/410738?v=3","gravatar_id":"","url":"https://api.github.com/users/TheCelavi","html_url":"https://github.com/TheCelavi","followers_url":"https://api.github.com/users/TheCelavi/followers","following_url":"https://api.github.com/users/TheCelavi/following{/other_user}","gists_url":"https://api.github.com/users/TheCelavi/gists{/gist_id}","starred_url":"https://api.github.com/users/TheCelavi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheCelavi/subscriptions","organizations_url":"https://api.github.com/users/TheCelavi/orgs","repos_url":"https://api.github.com/users/TheCelavi/repos","events_url":"https://api.github.com/users/TheCelavi/events{/privacy}","received_events_url":"https://api.github.com/users/TheCelavi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-31T14:20:54Z","updated_at":"2016-05-31T14:27:53Z","closed_at":null,"body":"Every auto-generated form is registered in: `Admingenerator\\GeneratorBundle\\DependencyInjection\\AdmingeneratorGeneratorExtension::registerFormsServicesFromGenerator` \r\n\r\nPattern is: \r\n\r\n` $container->setDefinition('admingen_generator_' . strtolower($model) . '_edit', $editDefinition);`\r\n\r\nNote that `_edit` can be `_new` and `_filter` as well.\r\n\r\n` strtolower($model)` is used, and model is class name **without** namespace prefix.\r\n\r\nThat means that, per example, classes:\r\n\r\n- `\\One\\ModelX`\r\n- `\\Two\\ModelX`\r\n\r\nWould have generated form type service under the same name:\r\n\r\n- `admingen_generator_modelx_edit`, and so on...\r\n\r\nThat means that in case when we have models with same name under different namespaces, form type services gets overridden. \r\n\r\nThis is easy fix, can someone confirm this, just another pair of eyes, in case I am missing something?\r\n"},"comment":{"url":"https://api.github.com/repos/symfony2admingenerator/GeneratorBundle/issues/comments/222705591","html_url":"https://github.com/symfony2admingenerator/GeneratorBundle/issues/288#issuecomment-222705591","issue_url":"https://api.github.com/repos/symfony2admingenerator/GeneratorBundle/issues/288","id":222705591,"user":{"login":"loostro","id":1419884,"avatar_url":"https://avatars.githubusercontent.com/u/1419884?v=3","gravatar_id":"","url":"https://api.github.com/users/loostro","html_url":"https://github.com/loostro","followers_url":"https://api.github.com/users/loostro/followers","following_url":"https://api.github.com/users/loostro/following{/other_user}","gists_url":"https://api.github.com/users/loostro/gists{/gist_id}","starred_url":"https://api.github.com/users/loostro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loostro/subscriptions","organizations_url":"https://api.github.com/users/loostro/orgs","repos_url":"https://api.github.com/users/loostro/repos","events_url":"https://api.github.com/users/loostro/events{/privacy}","received_events_url":"https://api.github.com/users/loostro/received_events","type":"User","site_admin":false},"created_at":"2016-05-31T14:27:53Z","updated_at":"2016-05-31T14:27:53Z","body":"@TheCelavi yes, this is obviously a bug, could you submit a PR to fix it?\r\nHowever, changeing the service names would introduce BC break to anyone already useing these forms (@sescandell  ? ). We should also provide an alias (old service name) to the first/latest defininion (whichever was in current behaviour)."}}
{"actor":{"display_login":"loostro"}}