{"action":"created","comment":{"url":"https://api.github.com/repos/symfony/symfony/pulls/comments/26483744","id":26483744,"diff_hunk":"@@ -62,9 +62,13 @@ protected function getCacheKey($template)\n      *\n      * @throws \\InvalidArgumentException When the template is not an instance of TemplateReferenceInterface\n      * @throws \\InvalidArgumentException When the template file can not be found\n+     *\n+     * @deprecated since version 2.8, to be removed in 3.0.\n      */\n     public function locate($template, $currentPath = null, $first = true)\n     {\n+        trigger_error('The '.__METHOD__.' is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);","path":"src/Symfony/Bundle/FrameworkBundle/Templating/Loader/TemplateLocator.php","position":9,"original_position":9,"commit_id":"0325692deadd9d118416c3268d02ba93dd8f786c","original_commit_id":"0325692deadd9d118416c3268d02ba93dd8f786c","user":{"login":"stof","id":439401,"avatar_url":"https://avatars.githubusercontent.com/u/439401?v=3","gravatar_id":"","url":"https://api.github.com/users/stof","html_url":"https://github.com/stof","followers_url":"https://api.github.com/users/stof/followers","following_url":"https://api.github.com/users/stof/following{/other_user}","gists_url":"https://api.github.com/users/stof/gists{/gist_id}","starred_url":"https://api.github.com/users/stof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stof/subscriptions","organizations_url":"https://api.github.com/users/stof/orgs","repos_url":"https://api.github.com/users/stof/repos","events_url":"https://api.github.com/users/stof/events{/privacy}","received_events_url":"https://api.github.com/users/stof/received_events","type":"User","site_admin":false},"body":"not settled yet. This is in discussion in the core team","created_at":"2015-03-16T13:33:03Z","updated_at":"2015-03-16T13:33:03Z","html_url":"https://github.com/symfony/symfony/pull/13928#discussion_r26483744","pull_request_url":"https://api.github.com/repos/symfony/symfony/pulls/13928","_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments/26483744"},"html":{"href":"https://github.com/symfony/symfony/pull/13928#discussion_r26483744"},"pull_request":{"href":"https://api.github.com/repos/symfony/symfony/pulls/13928"}}},"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/13928","id":31193887,"html_url":"https://github.com/symfony/symfony/pull/13928","diff_url":"https://github.com/symfony/symfony/pull/13928.diff","patch_url":"https://github.com/symfony/symfony/pull/13928.patch","issue_url":"https://api.github.com/repos/symfony/symfony/issues/13928","number":13928,"state":"open","locked":false,"title":"[WIP] Explicitly Declare Twig \"Paths\", deprecate old syntaxes","user":{"login":"weaverryan","id":121003,"avatar_url":"https://avatars.githubusercontent.com/u/121003?v=3","gravatar_id":"","url":"https://api.github.com/users/weaverryan","html_url":"https://github.com/weaverryan","followers_url":"https://api.github.com/users/weaverryan/followers","following_url":"https://api.github.com/users/weaverryan/following{/other_user}","gists_url":"https://api.github.com/users/weaverryan/gists{/gist_id}","starred_url":"https://api.github.com/users/weaverryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaverryan/subscriptions","organizations_url":"https://api.github.com/users/weaverryan/orgs","repos_url":"https://api.github.com/users/weaverryan/repos","events_url":"https://api.github.com/users/weaverryan/events{/privacy}","received_events_url":"https://api.github.com/users/weaverryan/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Bug fix?      | no\r\n| New feature?  | yes\r\n| BC breaks?    | no\r\n| Deprecations? | yes\r\n| Tests pass?   | TODO\r\n| Fixed tickets | n/a\r\n| License       | MIT\r\n| Doc PR        | TODO\r\n\r\nHallo!\r\n\r\nComments warmly appreciated. Actually, that's the whole point of pushing this early :).\r\n\r\n1) Deprecated the `AcmeDemoBundle:Foo:default.html.twig` syntax.\r\n\r\n2) Deprecated the automatic `@AcmeDemo`-style Twig namespace functionality\r\n\r\n3) Added a way for bundles to *explicitly* add a namespaced path. Usage:\r\n\r\n```php\r\n\r\nuse Symfony\\Bundle\\FrameworkBundle\\Bundle\\Bundle;\r\n\r\nclass FOSFooBundle extends Bundle\r\n{\r\n    public function __construct()\r\n    {\r\n        $this->addTwigPath(__DIR__.'/Resources/views', 'FOSFooBundle');\r\n    }\r\n}\r\n```\r\n\r\nthen (because this is how Twig paths already work):\r\n\r\n```php\r\n// renders @FOSFooBundle/Resources/views/product/list.html.twig\r\nreturn $this->render('@FOSFooBundle/product/list.html.twig');\r\n```\r\n\r\nThis is a lot more flexible than the \"automatic\" mapping and a lot more clear (because it's explicit) . It still maintains the \"fallback\" functionality (e.g. put something in `app/Resources/AcmeDemoBundle/...` to override) and everything works the same if the bundle decides to use a namespace that matches its bundle name.\r\n\r\nThis is a small step to removing some \"automatic\" magic that bundles give us. I'd like to see things more explicit in the bundle - e.g. `$this->addPublicDirectory(__DIR__.'/Resources/public', 'fos_foo')` and even translation resource loading, validation metadata, etc.\r\n\r\n### TODO\r\n\r\n* [ ] The [TemplateFinder](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/TemplateFinder.php) (used *only* by the `TemplatePathsCacheWarmer`) is currently (before this PR) broken, as it doesn't take into account Twig namespace paths.\r\n\r\n* [ ] These new paths are \"stuck\" inside Twig. So if I want to get the location of some non-Twig template (fake code `$templateLocator->find('@FOSFooBundle/smarty/ohno.tpl')` - I can't do that. If we agree, we can move the \"path\" functionality into some templating service that Twig uses.\r\n\r\n* [ ] Tests\r\n\r\n* [ ] Docs\r\n\r\nThanks!","created_at":"2015-03-15T02:02:11Z","updated_at":"2015-03-16T13:33:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c958553160f56bd0fb6480258c7a5fe9feeb5c56","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/symfony/symfony/pulls/13928/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony/pulls/13928/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/13928/comments","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/0325692deadd9d118416c3268d02ba93dd8f786c","head":{"label":"weaverryan:twig-namespaces","ref":"twig-namespaces","sha":"0325692deadd9d118416c3268d02ba93dd8f786c","user":{"login":"weaverryan","id":121003,"avatar_url":"https://avatars.githubusercontent.com/u/121003?v=3","gravatar_id":"","url":"https://api.github.com/users/weaverryan","html_url":"https://github.com/weaverryan","followers_url":"https://api.github.com/users/weaverryan/followers","following_url":"https://api.github.com/users/weaverryan/following{/other_user}","gists_url":"https://api.github.com/users/weaverryan/gists{/gist_id}","starred_url":"https://api.github.com/users/weaverryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaverryan/subscriptions","organizations_url":"https://api.github.com/users/weaverryan/orgs","repos_url":"https://api.github.com/users/weaverryan/repos","events_url":"https://api.github.com/users/weaverryan/events{/privacy}","received_events_url":"https://api.github.com/users/weaverryan/received_events","type":"User","site_admin":false},"repo":{"id":21151556,"name":"symfony","full_name":"weaverryan/symfony","owner":{"login":"weaverryan","id":121003,"avatar_url":"https://avatars.githubusercontent.com/u/121003?v=3","gravatar_id":"","url":"https://api.github.com/users/weaverryan","html_url":"https://github.com/weaverryan","followers_url":"https://api.github.com/users/weaverryan/followers","following_url":"https://api.github.com/users/weaverryan/following{/other_user}","gists_url":"https://api.github.com/users/weaverryan/gists{/gist_id}","starred_url":"https://api.github.com/users/weaverryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaverryan/subscriptions","organizations_url":"https://api.github.com/users/weaverryan/orgs","repos_url":"https://api.github.com/users/weaverryan/repos","events_url":"https://api.github.com/users/weaverryan/events{/privacy}","received_events_url":"https://api.github.com/users/weaverryan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/weaverryan/symfony","description":"The Symfony PHP framework","fork":true,"url":"https://api.github.com/repos/weaverryan/symfony","forks_url":"https://api.github.com/repos/weaverryan/symfony/forks","keys_url":"https://api.github.com/repos/weaverryan/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weaverryan/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weaverryan/symfony/teams","hooks_url":"https://api.github.com/repos/weaverryan/symfony/hooks","issue_events_url":"https://api.github.com/repos/weaverryan/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/weaverryan/symfony/events","assignees_url":"https://api.github.com/repos/weaverryan/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/weaverryan/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/weaverryan/symfony/tags","blobs_url":"https://api.github.com/repos/weaverryan/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weaverryan/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weaverryan/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/weaverryan/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weaverryan/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/weaverryan/symfony/languages","stargazers_url":"https://api.github.com/repos/weaverryan/symfony/stargazers","contributors_url":"https://api.github.com/repos/weaverryan/symfony/contributors","subscribers_url":"https://api.github.com/repos/weaverryan/symfony/subscribers","subscription_url":"https://api.github.com/repos/weaverryan/symfony/subscription","commits_url":"https://api.github.com/repos/weaverryan/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/weaverryan/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/weaverryan/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/weaverryan/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/weaverryan/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/weaverryan/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weaverryan/symfony/merges","archive_url":"https://api.github.com/repos/weaverryan/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weaverryan/symfony/downloads","issues_url":"https://api.github.com/repos/weaverryan/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/weaverryan/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/weaverryan/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/weaverryan/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weaverryan/symfony/labels{/name}","releases_url":"https://api.github.com/repos/weaverryan/symfony/releases{/id}","created_at":"2014-06-24T04:00:07Z","updated_at":"2014-06-24T04:09:23Z","pushed_at":"2015-03-15T01:43:02Z","git_url":"git://github.com/weaverryan/symfony.git","ssh_url":"git@github.com:weaverryan/symfony.git","clone_url":"https://github.com/weaverryan/symfony.git","svn_url":"https://github.com/weaverryan/symfony","homepage":"symfony.com","size":52247,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"symfony:2.7","ref":"2.7","sha":"a003380c39eb3ce0c6496af6b8bba65c801aba94","user":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"repo":{"id":458058,"name":"symfony","full_name":"symfony/symfony","owner":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symfony/symfony","description":"The Symfony PHP framework","fork":false,"url":"https://api.github.com/repos/symfony/symfony","forks_url":"https://api.github.com/repos/symfony/symfony/forks","keys_url":"https://api.github.com/repos/symfony/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony/symfony/teams","hooks_url":"https://api.github.com/repos/symfony/symfony/hooks","issue_events_url":"https://api.github.com/repos/symfony/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/symfony/symfony/events","assignees_url":"https://api.github.com/repos/symfony/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/symfony/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/symfony/symfony/tags","blobs_url":"https://api.github.com/repos/symfony/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony/symfony/languages","stargazers_url":"https://api.github.com/repos/symfony/symfony/stargazers","contributors_url":"https://api.github.com/repos/symfony/symfony/contributors","subscribers_url":"https://api.github.com/repos/symfony/symfony/subscribers","subscription_url":"https://api.github.com/repos/symfony/symfony/subscription","commits_url":"https://api.github.com/repos/symfony/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/symfony/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony/symfony/merges","archive_url":"https://api.github.com/repos/symfony/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony/symfony/downloads","issues_url":"https://api.github.com/repos/symfony/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/symfony/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony/symfony/labels{/name}","releases_url":"https://api.github.com/repos/symfony/symfony/releases{/id}","created_at":"2010-01-04T14:21:21Z","updated_at":"2015-03-15T19:44:23Z","pushed_at":"2015-03-15T19:44:12Z","git_url":"git://github.com/symfony/symfony.git","ssh_url":"git@github.com:symfony/symfony.git","clone_url":"https://github.com/symfony/symfony.git","svn_url":"https://github.com/symfony/symfony","homepage":"symfony.com","size":207955,"stargazers_count":9825,"watchers_count":9825,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":3842,"mirror_url":null,"open_issues_count":760,"forks":3842,"open_issues":760,"watchers":9825,"default_branch":"2.7"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/13928"},"html":{"href":"https://github.com/symfony/symfony/pull/13928"},"issue":{"href":"https://api.github.com/repos/symfony/symfony/issues/13928"},"comments":{"href":"https://api.github.com/repos/symfony/symfony/issues/13928/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony/pulls/13928/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony/pulls/13928/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony/statuses/0325692deadd9d118416c3268d02ba93dd8f786c"}}}}