{"action":"created","comment":{"url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/pulls/comments/48101484","id":48101484,"diff_hunk":"@@ -77,10 +77,9 @@ protected function parseMappingNode(\\DOMElement $mappingNode, $path)\n         }\n         $classMetadata = new ClassMetadata($className);\n \n+        $deprecatedUriSchema = null;\n         try {\n-            $classMetadata->setUriSchema(\n-                $this->readAttribute($mappingNode, 'uri-schema', sprintf('for \"%s\" in \"%s\"', $className, $path))\n-            );\n+            $deprecatedUriSchema = $this->readAttribute($mappingNode, 'uri-schema', sprintf('for \"%s\" in \"%s\"', $className, $path));","path":"Mapping/Loader/XmlFileLoader.php","position":17,"original_position":23,"commit_id":"3e0ee02f933df7b3073a10f32333f4b7a1b42b7b","original_commit_id":"a5a57c2cb14520d3352290db384e3c50c8289b32","user":{"login":"dantleech","id":530801,"avatar_url":"https://avatars.githubusercontent.com/u/530801?v=3","gravatar_id":"","url":"https://api.github.com/users/dantleech","html_url":"https://github.com/dantleech","followers_url":"https://api.github.com/users/dantleech/followers","following_url":"https://api.github.com/users/dantleech/following{/other_user}","gists_url":"https://api.github.com/users/dantleech/gists{/gist_id}","starred_url":"https://api.github.com/users/dantleech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dantleech/subscriptions","organizations_url":"https://api.github.com/users/dantleech/orgs","repos_url":"https://api.github.com/users/dantleech/repos","events_url":"https://api.github.com/users/dantleech/events{/privacy}","received_events_url":"https://api.github.com/users/dantleech/received_events","type":"User","site_admin":false},"body":"Added deprecation notices.","created_at":"2015-12-20T09:25:28Z","updated_at":"2015-12-20T09:25:28Z","html_url":"https://github.com/symfony-cmf/RoutingAuto/pull/62#discussion_r48101484","pull_request_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/pulls/62","_links":{"self":{"href":"https://api.github.com/repos/symfony-cmf/RoutingAuto/pulls/comments/48101484"},"html":{"href":"https://github.com/symfony-cmf/RoutingAuto/pull/62#discussion_r48101484"},"pull_request":{"href":"https://api.github.com/repos/symfony-cmf/RoutingAuto/pulls/62"}}},"pull_request":{"url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/pulls/62","id":53378323,"html_url":"https://github.com/symfony-cmf/RoutingAuto/pull/62","diff_url":"https://github.com/symfony-cmf/RoutingAuto/pull/62.diff","patch_url":"https://github.com/symfony-cmf/RoutingAuto/pull/62.patch","issue_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/issues/62","number":62,"state":"open","locked":false,"title":"Multiple routes refactoring.","user":{"login":"dantleech","id":530801,"avatar_url":"https://avatars.githubusercontent.com/u/530801?v=3","gravatar_id":"","url":"https://api.github.com/users/dantleech","html_url":"https://github.com/dantleech","followers_url":"https://api.github.com/users/dantleech/followers","following_url":"https://api.github.com/users/dantleech/following{/other_user}","gists_url":"https://api.github.com/users/dantleech/gists{/gist_id}","starred_url":"https://api.github.com/users/dantleech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dantleech/subscriptions","organizations_url":"https://api.github.com/users/dantleech/orgs","repos_url":"https://api.github.com/users/dantleech/repos","events_url":"https://api.github.com/users/dantleech/events{/privacy}","received_events_url":"https://api.github.com/users/dantleech/received_events","type":"User","site_admin":false},"body":"This PR refactors the building of routes to enable the possiblity for us to have multiple routes per object.\r\n\r\nThe essential change here is that the UriGenerator no longer has a dependency on the `ClassMetadataFactory` - this depenency forced the `UriGenerator` only to act once upon an object.\r\n\r\nNow each `UriContext` is populated with the necessary data from the metadata (uri schema, conflict resolver, token providers) before being passed to the `UriGenerator`. This means that the `UriGenerator` can generate many different URIs for the same object.\r\n\r\n<strike>The next step (another PR) would be the specification of multiple \"schemas\" per object in the ,metadata configuration.</strike> (implemented).\r\n\r\n**BC**: This PR is BC but deprecates the assignation of `uri_schema` to a string.\r\n\r\n```yaml\r\nstdClass:\r\n    uri_schema: \r\n        edit:\r\n            template: /forum/{category}/{post_title}/edit\r\n            defaults:\r\n                _type: edit\r\n        view:\r\n            template: /forum/{category}/{post_title}/view\r\n            defaults:\r\n                _type: view\r\n    token_providers:\r\n        category: [foo]\r\n```\r\n\r\n```xml\r\n<?xml version=\"1.0\" ?>\r\n<auto-mapping xmlns=\"http://cmf.symfony.com/schema/routing_auto\">\r\n    <mapping class=\"stdClass\">\r\n        <uri-schema template=\"/forum/{category}/{post_title}/edit\">\r\n            <default key=\"_type\">edit</default>\r\n        </uri-schema>\r\n\r\n        <uri-schema template=\"/forum/{category}/{post_title}/view\">\r\n            <default key=\"_type\">view</default>\r\n        </uri-schema>\r\n\r\n        <conflict-resolver name=\"auto_increment\">\r\n            <option name=\"token\">category</option>\r\n        </conflict-resolver>\r\n\r\n        <token-provider token=\"category\" name=\"method\">\r\n            <option name=\"method\">getCategoryName</option>\r\n        </token-provider>\r\n\r\n        <token-provider token=\"slug\" name=\"property\">\r\n            <option name=\"property\">title</option>\r\n            <option name=\"slugify\">true</option>\r\n        </token-provider>\r\n    </mapping>\r\n</auto-mapping>\r\n```","created_at":"2015-12-11T10:52:07Z","updated_at":"2015-12-20T09:25:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"62af9b22a28f8c4545f40a83f3afe9f6457f343a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/pulls/62/commits","review_comments_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/pulls/62/comments","review_comment_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/issues/62/comments","statuses_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/statuses/3e0ee02f933df7b3073a10f32333f4b7a1b42b7b","head":{"label":"symfony-cmf:multiple_routes","ref":"multiple_routes","sha":"3e0ee02f933df7b3073a10f32333f4b7a1b42b7b","user":{"login":"symfony-cmf","id":342045,"avatar_url":"https://avatars.githubusercontent.com/u/342045?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony-cmf","html_url":"https://github.com/symfony-cmf","followers_url":"https://api.github.com/users/symfony-cmf/followers","following_url":"https://api.github.com/users/symfony-cmf/following{/other_user}","gists_url":"https://api.github.com/users/symfony-cmf/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony-cmf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony-cmf/subscriptions","organizations_url":"https://api.github.com/users/symfony-cmf/orgs","repos_url":"https://api.github.com/users/symfony-cmf/repos","events_url":"https://api.github.com/users/symfony-cmf/events{/privacy}","received_events_url":"https://api.github.com/users/symfony-cmf/received_events","type":"Organization","site_admin":false},"repo":{"id":21073460,"name":"RoutingAuto","full_name":"symfony-cmf/RoutingAuto","owner":{"login":"symfony-cmf","id":342045,"avatar_url":"https://avatars.githubusercontent.com/u/342045?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony-cmf","html_url":"https://github.com/symfony-cmf","followers_url":"https://api.github.com/users/symfony-cmf/followers","following_url":"https://api.github.com/users/symfony-cmf/following{/other_user}","gists_url":"https://api.github.com/users/symfony-cmf/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony-cmf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony-cmf/subscriptions","organizations_url":"https://api.github.com/users/symfony-cmf/orgs","repos_url":"https://api.github.com/users/symfony-cmf/repos","events_url":"https://api.github.com/users/symfony-cmf/events{/privacy}","received_events_url":"https://api.github.com/users/symfony-cmf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symfony-cmf/RoutingAuto","description":"RoutingAuto component","fork":false,"url":"https://api.github.com/repos/symfony-cmf/RoutingAuto","forks_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/forks","keys_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/teams","hooks_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/hooks","issue_events_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/issues/events{/number}","events_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/events","assignees_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/assignees{/user}","branches_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/branches{/branch}","tags_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/tags","blobs_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/languages","stargazers_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/stargazers","contributors_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/contributors","subscribers_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/subscribers","subscription_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/subscription","commits_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/contents/{+path}","compare_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/merges","archive_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/downloads","issues_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/issues{/number}","pulls_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/labels{/name}","releases_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/releases{/id}","created_at":"2014-06-21T16:43:12Z","updated_at":"2015-09-30T19:47:57Z","pushed_at":"2015-12-18T10:37:37Z","git_url":"git://github.com/symfony-cmf/RoutingAuto.git","ssh_url":"git@github.com:symfony-cmf/RoutingAuto.git","clone_url":"https://github.com/symfony-cmf/RoutingAuto.git","svn_url":"https://github.com/symfony-cmf/RoutingAuto","homepage":null,"size":526,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":10,"forks":3,"open_issues":10,"watchers":2,"default_branch":"master"}},"base":{"label":"symfony-cmf:master","ref":"master","sha":"2253a8e7e14aff0b3fbbfbb5876598b70dba1913","user":{"login":"symfony-cmf","id":342045,"avatar_url":"https://avatars.githubusercontent.com/u/342045?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony-cmf","html_url":"https://github.com/symfony-cmf","followers_url":"https://api.github.com/users/symfony-cmf/followers","following_url":"https://api.github.com/users/symfony-cmf/following{/other_user}","gists_url":"https://api.github.com/users/symfony-cmf/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony-cmf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony-cmf/subscriptions","organizations_url":"https://api.github.com/users/symfony-cmf/orgs","repos_url":"https://api.github.com/users/symfony-cmf/repos","events_url":"https://api.github.com/users/symfony-cmf/events{/privacy}","received_events_url":"https://api.github.com/users/symfony-cmf/received_events","type":"Organization","site_admin":false},"repo":{"id":21073460,"name":"RoutingAuto","full_name":"symfony-cmf/RoutingAuto","owner":{"login":"symfony-cmf","id":342045,"avatar_url":"https://avatars.githubusercontent.com/u/342045?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony-cmf","html_url":"https://github.com/symfony-cmf","followers_url":"https://api.github.com/users/symfony-cmf/followers","following_url":"https://api.github.com/users/symfony-cmf/following{/other_user}","gists_url":"https://api.github.com/users/symfony-cmf/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony-cmf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony-cmf/subscriptions","organizations_url":"https://api.github.com/users/symfony-cmf/orgs","repos_url":"https://api.github.com/users/symfony-cmf/repos","events_url":"https://api.github.com/users/symfony-cmf/events{/privacy}","received_events_url":"https://api.github.com/users/symfony-cmf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symfony-cmf/RoutingAuto","description":"RoutingAuto component","fork":false,"url":"https://api.github.com/repos/symfony-cmf/RoutingAuto","forks_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/forks","keys_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/teams","hooks_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/hooks","issue_events_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/issues/events{/number}","events_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/events","assignees_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/assignees{/user}","branches_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/branches{/branch}","tags_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/tags","blobs_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/languages","stargazers_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/stargazers","contributors_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/contributors","subscribers_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/subscribers","subscription_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/subscription","commits_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/contents/{+path}","compare_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/merges","archive_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/downloads","issues_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/issues{/number}","pulls_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/labels{/name}","releases_url":"https://api.github.com/repos/symfony-cmf/RoutingAuto/releases{/id}","created_at":"2014-06-21T16:43:12Z","updated_at":"2015-09-30T19:47:57Z","pushed_at":"2015-12-18T10:37:37Z","git_url":"git://github.com/symfony-cmf/RoutingAuto.git","ssh_url":"git@github.com:symfony-cmf/RoutingAuto.git","clone_url":"https://github.com/symfony-cmf/RoutingAuto.git","svn_url":"https://github.com/symfony-cmf/RoutingAuto","homepage":null,"size":526,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":10,"forks":3,"open_issues":10,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony-cmf/RoutingAuto/pulls/62"},"html":{"href":"https://github.com/symfony-cmf/RoutingAuto/pull/62"},"issue":{"href":"https://api.github.com/repos/symfony-cmf/RoutingAuto/issues/62"},"comments":{"href":"https://api.github.com/repos/symfony-cmf/RoutingAuto/issues/62/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony-cmf/RoutingAuto/pulls/62/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony-cmf/RoutingAuto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony-cmf/RoutingAuto/pulls/62/commits"},"statuses":{"href":"https://api.github.com/repos/symfony-cmf/RoutingAuto/statuses/3e0ee02f933df7b3073a10f32333f4b7a1b42b7b"}}}}