{"action":"created","comment":{"url":"https://api.github.com/repos/silexphp/Silex/pulls/comments/32390432","id":32390432,"diff_hunk":"@@ -29,12 +29,12 @@\n use Symfony\\Component\\HttpFoundation\\RedirectResponse;\n use Symfony\\Component\\HttpFoundation\\StreamedResponse;\n use Symfony\\Component\\HttpFoundation\\JsonResponse;\n-use Symfony\\Component\\Routing\\RouteCollection;\n use Silex\\Api\\BootableProviderInterface;\n use Silex\\Api\\EventListenerProviderInterface;\n use Silex\\Api\\ControllerProviderInterface;\n use Silex\\Provider\\RoutingServiceProvider;\n use Silex\\Provider\\KernelServiceProvider;\n+use Symfony\\Component\\Routing\\RouteCollection;","path":"src/Silex/Application.php","position":10,"original_position":10,"commit_id":"23c0f741e4d13fd448c3685d1bfb427a606be212","original_commit_id":"23c0f741e4d13fd448c3685d1bfb427a606be212","user":{"login":"fabpot","id":47313,"avatar_url":"https://avatars.githubusercontent.com/u/47313?v=3","gravatar_id":"","url":"https://api.github.com/users/fabpot","html_url":"https://github.com/fabpot","followers_url":"https://api.github.com/users/fabpot/followers","following_url":"https://api.github.com/users/fabpot/following{/other_user}","gists_url":"https://api.github.com/users/fabpot/gists{/gist_id}","starred_url":"https://api.github.com/users/fabpot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabpot/subscriptions","organizations_url":"https://api.github.com/users/fabpot/orgs","repos_url":"https://api.github.com/users/fabpot/repos","events_url":"https://api.github.com/users/fabpot/events{/privacy}","received_events_url":"https://api.github.com/users/fabpot/received_events","type":"User","site_admin":false},"body":"This should be reverted back to its original place.","created_at":"2015-06-15T03:43:01Z","updated_at":"2015-06-15T03:43:01Z","html_url":"https://github.com/silexphp/Silex/pull/1175#discussion_r32390432","pull_request_url":"https://api.github.com/repos/silexphp/Silex/pulls/1175","_links":{"self":{"href":"https://api.github.com/repos/silexphp/Silex/pulls/comments/32390432"},"html":{"href":"https://github.com/silexphp/Silex/pull/1175#discussion_r32390432"},"pull_request":{"href":"https://api.github.com/repos/silexphp/Silex/pulls/1175"}}},"pull_request":{"url":"https://api.github.com/repos/silexphp/Silex/pulls/1175","id":37534720,"html_url":"https://github.com/silexphp/Silex/pull/1175","diff_url":"https://github.com/silexphp/Silex/pull/1175.diff","patch_url":"https://github.com/silexphp/Silex/pull/1175.patch","issue_url":"https://api.github.com/repos/silexphp/Silex/issues/1175","number":1175,"state":"open","locked":false,"title":"Added factory for RouteCollection, makes subclassing of RouteCollection possible.","user":{"login":"lschricke","id":3723626,"avatar_url":"https://avatars.githubusercontent.com/u/3723626?v=3","gravatar_id":"","url":"https://api.github.com/users/lschricke","html_url":"https://github.com/lschricke","followers_url":"https://api.github.com/users/lschricke/followers","following_url":"https://api.github.com/users/lschricke/following{/other_user}","gists_url":"https://api.github.com/users/lschricke/gists{/gist_id}","starred_url":"https://api.github.com/users/lschricke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lschricke/subscriptions","organizations_url":"https://api.github.com/users/lschricke/orgs","repos_url":"https://api.github.com/users/lschricke/repos","events_url":"https://api.github.com/users/lschricke/events{/privacy}","received_events_url":"https://api.github.com/users/lschricke/received_events","type":"User","site_admin":false},"body":"Note: replaces #1174, which was targeting a wrong branch (and where I messed a bit with the commits ;)).\r\n\r\n--\r\n\r\nThe aim of this PR is to allow developpers to subclass `Symfony\\Component\\Routing\\RouteCollection` to change some of its behavior.\r\n\r\nIn most of my Silex apps, I figured I don't want the Symfony's `RouteCollection` regular behavior where if you define two routes with the same name (bad copy-paste for instance), the first route added simply gets overriden by the second. Instead, I would like to be able to throw an Exception if that happens. So I've written [a tiny subclass of RouteCollection](https://github.com/lschricke/symfony-strict-route-collection), but to be able to use it (through [a service provider like this](https://github.com/lschricke/silex-strict-route-collection-service-provider) for instance (needs to be updated for Silex 2)), I need to be able to replace `RouteCollection` by my subclass. This PR makes it possible.\r\n\r\nThanks! :)","created_at":"2015-06-12T06:15:07Z","updated_at":"2015-06-15T03:43:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3519d4f3a5f07d64e3201d70cb7d4869c7191898","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/silexphp/Silex/pulls/1175/commits","review_comments_url":"https://api.github.com/repos/silexphp/Silex/pulls/1175/comments","review_comment_url":"https://api.github.com/repos/silexphp/Silex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/silexphp/Silex/issues/1175/comments","statuses_url":"https://api.github.com/repos/silexphp/Silex/statuses/23c0f741e4d13fd448c3685d1bfb427a606be212","head":{"label":"lschricke:allow-routecollection-subclassing","ref":"allow-routecollection-subclassing","sha":"23c0f741e4d13fd448c3685d1bfb427a606be212","user":{"login":"lschricke","id":3723626,"avatar_url":"https://avatars.githubusercontent.com/u/3723626?v=3","gravatar_id":"","url":"https://api.github.com/users/lschricke","html_url":"https://github.com/lschricke","followers_url":"https://api.github.com/users/lschricke/followers","following_url":"https://api.github.com/users/lschricke/following{/other_user}","gists_url":"https://api.github.com/users/lschricke/gists{/gist_id}","starred_url":"https://api.github.com/users/lschricke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lschricke/subscriptions","organizations_url":"https://api.github.com/users/lschricke/orgs","repos_url":"https://api.github.com/users/lschricke/repos","events_url":"https://api.github.com/users/lschricke/events{/privacy}","received_events_url":"https://api.github.com/users/lschricke/received_events","type":"User","site_admin":false},"repo":{"id":37039189,"name":"Silex","full_name":"lschricke/Silex","owner":{"login":"lschricke","id":3723626,"avatar_url":"https://avatars.githubusercontent.com/u/3723626?v=3","gravatar_id":"","url":"https://api.github.com/users/lschricke","html_url":"https://github.com/lschricke","followers_url":"https://api.github.com/users/lschricke/followers","following_url":"https://api.github.com/users/lschricke/following{/other_user}","gists_url":"https://api.github.com/users/lschricke/gists{/gist_id}","starred_url":"https://api.github.com/users/lschricke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lschricke/subscriptions","organizations_url":"https://api.github.com/users/lschricke/orgs","repos_url":"https://api.github.com/users/lschricke/repos","events_url":"https://api.github.com/users/lschricke/events{/privacy}","received_events_url":"https://api.github.com/users/lschricke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lschricke/Silex","description":"The PHP micro-framework based on the Symfony2 Components ","fork":true,"url":"https://api.github.com/repos/lschricke/Silex","forks_url":"https://api.github.com/repos/lschricke/Silex/forks","keys_url":"https://api.github.com/repos/lschricke/Silex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lschricke/Silex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lschricke/Silex/teams","hooks_url":"https://api.github.com/repos/lschricke/Silex/hooks","issue_events_url":"https://api.github.com/repos/lschricke/Silex/issues/events{/number}","events_url":"https://api.github.com/repos/lschricke/Silex/events","assignees_url":"https://api.github.com/repos/lschricke/Silex/assignees{/user}","branches_url":"https://api.github.com/repos/lschricke/Silex/branches{/branch}","tags_url":"https://api.github.com/repos/lschricke/Silex/tags","blobs_url":"https://api.github.com/repos/lschricke/Silex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lschricke/Silex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lschricke/Silex/git/refs{/sha}","trees_url":"https://api.github.com/repos/lschricke/Silex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lschricke/Silex/statuses/{sha}","languages_url":"https://api.github.com/repos/lschricke/Silex/languages","stargazers_url":"https://api.github.com/repos/lschricke/Silex/stargazers","contributors_url":"https://api.github.com/repos/lschricke/Silex/contributors","subscribers_url":"https://api.github.com/repos/lschricke/Silex/subscribers","subscription_url":"https://api.github.com/repos/lschricke/Silex/subscription","commits_url":"https://api.github.com/repos/lschricke/Silex/commits{/sha}","git_commits_url":"https://api.github.com/repos/lschricke/Silex/git/commits{/sha}","comments_url":"https://api.github.com/repos/lschricke/Silex/comments{/number}","issue_comment_url":"https://api.github.com/repos/lschricke/Silex/issues/comments{/number}","contents_url":"https://api.github.com/repos/lschricke/Silex/contents/{+path}","compare_url":"https://api.github.com/repos/lschricke/Silex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lschricke/Silex/merges","archive_url":"https://api.github.com/repos/lschricke/Silex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lschricke/Silex/downloads","issues_url":"https://api.github.com/repos/lschricke/Silex/issues{/number}","pulls_url":"https://api.github.com/repos/lschricke/Silex/pulls{/number}","milestones_url":"https://api.github.com/repos/lschricke/Silex/milestones{/number}","notifications_url":"https://api.github.com/repos/lschricke/Silex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lschricke/Silex/labels{/name}","releases_url":"https://api.github.com/repos/lschricke/Silex/releases{/id}","created_at":"2015-06-08T01:14:49Z","updated_at":"2015-06-08T01:14:49Z","pushed_at":"2015-06-15T03:06:06Z","git_url":"git://github.com/lschricke/Silex.git","ssh_url":"git@github.com:lschricke/Silex.git","clone_url":"https://github.com/lschricke/Silex.git","svn_url":"https://github.com/lschricke/Silex","homepage":"silex.sensiolabs.org","size":3143,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"1.3"}},"base":{"label":"silexphp:master","ref":"master","sha":"cfb6ed098aaf9a62434761033d4b611662549b8b","user":{"login":"silexphp","id":3840103,"avatar_url":"https://avatars.githubusercontent.com/u/3840103?v=3","gravatar_id":"","url":"https://api.github.com/users/silexphp","html_url":"https://github.com/silexphp","followers_url":"https://api.github.com/users/silexphp/followers","following_url":"https://api.github.com/users/silexphp/following{/other_user}","gists_url":"https://api.github.com/users/silexphp/gists{/gist_id}","starred_url":"https://api.github.com/users/silexphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silexphp/subscriptions","organizations_url":"https://api.github.com/users/silexphp/orgs","repos_url":"https://api.github.com/users/silexphp/repos","events_url":"https://api.github.com/users/silexphp/events{/privacy}","received_events_url":"https://api.github.com/users/silexphp/received_events","type":"Organization","site_admin":false},"repo":{"id":914985,"name":"Silex","full_name":"silexphp/Silex","owner":{"login":"silexphp","id":3840103,"avatar_url":"https://avatars.githubusercontent.com/u/3840103?v=3","gravatar_id":"","url":"https://api.github.com/users/silexphp","html_url":"https://github.com/silexphp","followers_url":"https://api.github.com/users/silexphp/followers","following_url":"https://api.github.com/users/silexphp/following{/other_user}","gists_url":"https://api.github.com/users/silexphp/gists{/gist_id}","starred_url":"https://api.github.com/users/silexphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silexphp/subscriptions","organizations_url":"https://api.github.com/users/silexphp/orgs","repos_url":"https://api.github.com/users/silexphp/repos","events_url":"https://api.github.com/users/silexphp/events{/privacy}","received_events_url":"https://api.github.com/users/silexphp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/silexphp/Silex","description":"The PHP micro-framework based on the Symfony2 Components ","fork":false,"url":"https://api.github.com/repos/silexphp/Silex","forks_url":"https://api.github.com/repos/silexphp/Silex/forks","keys_url":"https://api.github.com/repos/silexphp/Silex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/silexphp/Silex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/silexphp/Silex/teams","hooks_url":"https://api.github.com/repos/silexphp/Silex/hooks","issue_events_url":"https://api.github.com/repos/silexphp/Silex/issues/events{/number}","events_url":"https://api.github.com/repos/silexphp/Silex/events","assignees_url":"https://api.github.com/repos/silexphp/Silex/assignees{/user}","branches_url":"https://api.github.com/repos/silexphp/Silex/branches{/branch}","tags_url":"https://api.github.com/repos/silexphp/Silex/tags","blobs_url":"https://api.github.com/repos/silexphp/Silex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/silexphp/Silex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/silexphp/Silex/git/refs{/sha}","trees_url":"https://api.github.com/repos/silexphp/Silex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/silexphp/Silex/statuses/{sha}","languages_url":"https://api.github.com/repos/silexphp/Silex/languages","stargazers_url":"https://api.github.com/repos/silexphp/Silex/stargazers","contributors_url":"https://api.github.com/repos/silexphp/Silex/contributors","subscribers_url":"https://api.github.com/repos/silexphp/Silex/subscribers","subscription_url":"https://api.github.com/repos/silexphp/Silex/subscription","commits_url":"https://api.github.com/repos/silexphp/Silex/commits{/sha}","git_commits_url":"https://api.github.com/repos/silexphp/Silex/git/commits{/sha}","comments_url":"https://api.github.com/repos/silexphp/Silex/comments{/number}","issue_comment_url":"https://api.github.com/repos/silexphp/Silex/issues/comments{/number}","contents_url":"https://api.github.com/repos/silexphp/Silex/contents/{+path}","compare_url":"https://api.github.com/repos/silexphp/Silex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/silexphp/Silex/merges","archive_url":"https://api.github.com/repos/silexphp/Silex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/silexphp/Silex/downloads","issues_url":"https://api.github.com/repos/silexphp/Silex/issues{/number}","pulls_url":"https://api.github.com/repos/silexphp/Silex/pulls{/number}","milestones_url":"https://api.github.com/repos/silexphp/Silex/milestones{/number}","notifications_url":"https://api.github.com/repos/silexphp/Silex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/silexphp/Silex/labels{/name}","releases_url":"https://api.github.com/repos/silexphp/Silex/releases{/id}","created_at":"2010-09-16T09:47:20Z","updated_at":"2015-06-15T02:49:02Z","pushed_at":"2015-06-15T03:06:07Z","git_url":"git://github.com/silexphp/Silex.git","ssh_url":"git@github.com:silexphp/Silex.git","clone_url":"https://github.com/silexphp/Silex.git","svn_url":"https://github.com/silexphp/Silex","homepage":"silex.sensiolabs.org","size":8413,"stargazers_count":2739,"watchers_count":2739,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":579,"mirror_url":null,"open_issues_count":29,"forks":579,"open_issues":29,"watchers":2739,"default_branch":"1.3"}},"_links":{"self":{"href":"https://api.github.com/repos/silexphp/Silex/pulls/1175"},"html":{"href":"https://github.com/silexphp/Silex/pull/1175"},"issue":{"href":"https://api.github.com/repos/silexphp/Silex/issues/1175"},"comments":{"href":"https://api.github.com/repos/silexphp/Silex/issues/1175/comments"},"review_comments":{"href":"https://api.github.com/repos/silexphp/Silex/pulls/1175/comments"},"review_comment":{"href":"https://api.github.com/repos/silexphp/Silex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/silexphp/Silex/pulls/1175/commits"},"statuses":{"href":"https://api.github.com/repos/silexphp/Silex/statuses/23c0f741e4d13fd448c3685d1bfb427a606be212"}}}}