{"action":"created","issue":{"url":"https://api.github.com/repos/Sylius/Sylius/issues/4959","repository_url":"https://api.github.com/repos/Sylius/Sylius","labels_url":"https://api.github.com/repos/Sylius/Sylius/issues/4959/labels{/name}","comments_url":"https://api.github.com/repos/Sylius/Sylius/issues/4959/comments","events_url":"https://api.github.com/repos/Sylius/Sylius/issues/4959/events","html_url":"https://github.com/Sylius/Sylius/issues/4959","id":153407984,"number":4959,"title":"SyliusResourceBundle template name guessing changed","user":{"login":"jrobeson","id":56908,"avatar_url":"https://avatars.githubusercontent.com/u/56908?v=3","gravatar_id":"","url":"https://api.github.com/users/jrobeson","html_url":"https://github.com/jrobeson","followers_url":"https://api.github.com/users/jrobeson/followers","following_url":"https://api.github.com/users/jrobeson/following{/other_user}","gists_url":"https://api.github.com/users/jrobeson/gists{/gist_id}","starred_url":"https://api.github.com/users/jrobeson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrobeson/subscriptions","organizations_url":"https://api.github.com/users/jrobeson/orgs","repos_url":"https://api.github.com/users/jrobeson/repos","events_url":"https://api.github.com/users/jrobeson/events{/privacy}","received_events_url":"https://api.github.com/users/jrobeson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Sylius/Sylius/labels/BC%20Break","name":"BC Break","color":"CF1D1D"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-06T08:54:05Z","updated_at":"2016-05-07T00:55:44Z","closed_at":null,"body":"This change wasn't mentioned in the changelog for the ResourceBundle. \r\n\r\nI was using SyliusResourceBundle v0.14 and then upgraded to 0.17  and my templates named like `Resources/views/update.html.twig` no longer work. The system seems to want them to be `Resources/views/update.html.twig`.  \r\n\r\nIt seems like now, only routes defined like:\r\n\r\n```yml\r\napp_book:\r\n    resource: |\r\n        alias: app.book\r\n    type: sylius.resource\r\n```\r\n\r\nend up getting their internal names translated to action.html.twig due to the code here: https://github.com/Sylius/Sylius/blob/v0.17.0/src/Sylius/Bundle/ResourceBundle/Routing/ResourceLoader.php#L152 and here https://github.com/Sylius/Sylius/blob/v0.17.0/src/Sylius/Bundle/ResourceBundle/Controller/RequestConfiguration.php#L99\r\n\r\nWhich means manually defined routes without the template key never get their names translated.\r\n\r\n```yml\r\napp_book_index:                                                                                                             \r\n    path: /books                                                                                                                   \r\n   methods: [GET]                                                                                                                 \r\n   defaults:                                                                                                                      \r\n       _controller: app.controller.book:indexAction                                                                        \r\n      _sylius:                                                                                                                   \r\n          paginate: 20                                                                                                           \r\n          sortable: true                                                                                                         \r\n          sorting:                                                                                                               \r\n         id: asc   \r\n```\r\n\r\nPreviously, this name translation was done at runtime, but it can't seem to do that now.\r\n\r\nOn another note: The code in https://github.com/Sylius/Sylius/blob/v0.17.0/src/Sylius/Bundle/ResourceBundle/Controller/RequestConfiguration.php#L99 also means you can't use Twig namespaced paths due to the embedded colon\r\n\r\nI'm not what folks want to do about this, but I'd prefer not having to rename my templates (and also to be able to use twig namespaced paths)\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Sylius/Sylius/issues/comments/217594520","html_url":"https://github.com/Sylius/Sylius/issues/4959#issuecomment-217594520","issue_url":"https://api.github.com/repos/Sylius/Sylius/issues/4959","id":217594520,"user":{"login":"jrobeson","id":56908,"avatar_url":"https://avatars.githubusercontent.com/u/56908?v=3","gravatar_id":"","url":"https://api.github.com/users/jrobeson","html_url":"https://github.com/jrobeson","followers_url":"https://api.github.com/users/jrobeson/followers","following_url":"https://api.github.com/users/jrobeson/following{/other_user}","gists_url":"https://api.github.com/users/jrobeson/gists{/gist_id}","starred_url":"https://api.github.com/users/jrobeson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrobeson/subscriptions","organizations_url":"https://api.github.com/users/jrobeson/orgs","repos_url":"https://api.github.com/users/jrobeson/repos","events_url":"https://api.github.com/users/jrobeson/events{/privacy}","received_events_url":"https://api.github.com/users/jrobeson/received_events","type":"User","site_admin":false},"created_at":"2016-05-07T00:55:44Z","updated_at":"2016-05-07T00:55:44Z","body":"it was at least trivial to add twig namespaced paths support by simply checking for @ in the templates namespace and replacing  the : with / in RequestConfiguration when @ is found"}}