{"action":"created","issue":{"url":"https://api.github.com/repos/doctrine/common/issues/357","labels_url":"https://api.github.com/repos/doctrine/common/issues/357/labels{/name}","comments_url":"https://api.github.com/repos/doctrine/common/issues/357/comments","events_url":"https://api.github.com/repos/doctrine/common/issues/357/events","html_url":"https://github.com/doctrine/common/pull/357","id":58759292,"number":357,"title":"Custom namespace separators for SymfonyFileLocator","user":{"login":"scaytrase","id":6578413,"avatar_url":"https://avatars.githubusercontent.com/u/6578413?v=3","gravatar_id":"","url":"https://api.github.com/users/scaytrase","html_url":"https://github.com/scaytrase","followers_url":"https://api.github.com/users/scaytrase/followers","following_url":"https://api.github.com/users/scaytrase/following{/other_user}","gists_url":"https://api.github.com/users/scaytrase/gists{/gist_id}","starred_url":"https://api.github.com/users/scaytrase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scaytrase/subscriptions","organizations_url":"https://api.github.com/users/scaytrase/orgs","repos_url":"https://api.github.com/users/scaytrase/repos","events_url":"https://api.github.com/users/scaytrase/events{/privacy}","received_events_url":"https://api.github.com/users/scaytrase/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"Ocramius","id":154256,"avatar_url":"https://avatars.githubusercontent.com/u/154256?v=3","gravatar_id":"","url":"https://api.github.com/users/Ocramius","html_url":"https://github.com/Ocramius","followers_url":"https://api.github.com/users/Ocramius/followers","following_url":"https://api.github.com/users/Ocramius/following{/other_user}","gists_url":"https://api.github.com/users/Ocramius/gists{/gist_id}","starred_url":"https://api.github.com/users/Ocramius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ocramius/subscriptions","organizations_url":"https://api.github.com/users/Ocramius/orgs","repos_url":"https://api.github.com/users/Ocramius/repos","events_url":"https://api.github.com/users/Ocramius/events{/privacy}","received_events_url":"https://api.github.com/users/Ocramius/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-02-24T16:01:53Z","updated_at":"2015-02-24T16:09:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/doctrine/common/pulls/357","html_url":"https://github.com/doctrine/common/pull/357","diff_url":"https://github.com/doctrine/common/pull/357.diff","patch_url":"https://github.com/doctrine/common/pull/357.patch"},"body":"As a Symofony user I'm tired of storaging dozens of yml metadata files within `config\\doctrine` folder as a plain list. Current implementation of `SymfonyFileLocator` fails to loopback class name due to automatic convertation extra classname separators behind default `Entity` prefix to dots, so placing yaml metadata files into nested folders does not work at all.\r\n\r\nThis also covers some other people needs as I see by \r\nhttp://stackoverflow.com/questions/14530782/symfony2-doctrine-entity-subdirectories\r\nhttp://stackoverflow.com/questions/20998622/is-anybody-knows-how-organize-orm-yml-for-symfony-2-x\r\n\r\nI've implemented custom namespace separator value to be substitued when `SymfonyFileLocator` lookup classname and converts filename to classname, allowing to store entity mapping with the same structure are placed, i.e with `DIRECTORY_SEPARATOR` used\r\n\r\n    Foo\\Bar => config/doctrine/Foo/Bar.orm.yml\r\n    Baz => config/doctrine/Baz.orm.yml\r\n\r\netc.\r\n\r\nI've added a bunch of test to be sure I've not broken something, with 3 examples of usage. \r\n * Classic - dot (`.`) separator. This is default for keeping BC\r\n * `DIRECTORY_SEPARATOR` - for representing namespaces as `PSR-4` / `PSR-0` structure with according prefix\r\n * Underscore (`_`) separator - as another way, which corresponds to `PSR-0` autoloading but as same list as with dots\r\n\r\nLocal (Windows, PHP 5.6) and Travis tests are passed \r\n\r\nhttps://travis-ci.org/scaytrase/doctrine-common/builds/51995201"},"comment":{"url":"https://api.github.com/repos/doctrine/common/issues/comments/75785691","html_url":"https://github.com/doctrine/common/pull/357#issuecomment-75785691","issue_url":"https://api.github.com/repos/doctrine/common/issues/357","id":75785691,"user":{"login":"Ocramius","id":154256,"avatar_url":"https://avatars.githubusercontent.com/u/154256?v=3","gravatar_id":"","url":"https://api.github.com/users/Ocramius","html_url":"https://github.com/Ocramius","followers_url":"https://api.github.com/users/Ocramius/followers","following_url":"https://api.github.com/users/Ocramius/following{/other_user}","gists_url":"https://api.github.com/users/Ocramius/gists{/gist_id}","starred_url":"https://api.github.com/users/Ocramius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ocramius/subscriptions","organizations_url":"https://api.github.com/users/Ocramius/orgs","repos_url":"https://api.github.com/users/Ocramius/repos","events_url":"https://api.github.com/users/Ocramius/events{/privacy}","received_events_url":"https://api.github.com/users/Ocramius/received_events","type":"User","site_admin":false},"created_at":"2015-02-24T16:09:00Z","updated_at":"2015-02-24T16:09:00Z","body":"This looks good to me except for the constructor argument :-)"}}