{"action":"created","comment":{"url":"https://api.github.com/repos/contao/core-bundle/pulls/comments/29228415","id":29228415,"diff_hunk":"@@ -114,30 +51,14 @@ public function __construct(\n      */\n     public function onKernelRequest(GetResponseEvent $event)\n     {\n-        if (true === self::$booted || (!$this->isFrontendScope() && !$this->isBackendScope())) {\n+        if (true === self::$booted || !$this->isContaoScope()) {\n             return;\n         }\n \n         // Set before calling any methods to prevent recursive booting\n         self::$booted = true;\n \n-        $request = $event->getRequest();\n-\n-        $route = $this->router->generate(\n-            $request->attributes->get('_route'),\n-            $request->attributes->get('_route_params')\n-        );\n-\n-        $basePath = $request->getBasePath();\n-\n-        $this->setConstants(\n-            $this->getModeFromContainerScope(),\n-            substr($route, strlen($basePath) + 1),\n-            $basePath,\n-            $request->attributes->get('_contao_referer_id')\n-        );\n-\n-        $this->boot($request);\n+        $this->eventDispatcher->dispatch('contao.framework.boot', new ContaoFrameworkBootEvent($event->getRequest()));","path":"src/EventListener/InitializeSystemListener.php","position":140,"original_position":140,"commit_id":"44b2e36f7a4acb456d5e66f4e8c8103bb40869f1","original_commit_id":"d81b138152c381b014928f2327e775ee3b4cdf9f","user":{"login":"leofeyer","id":1192057,"avatar_url":"https://avatars.githubusercontent.com/u/1192057?v=3","gravatar_id":"","url":"https://api.github.com/users/leofeyer","html_url":"https://github.com/leofeyer","followers_url":"https://api.github.com/users/leofeyer/followers","following_url":"https://api.github.com/users/leofeyer/following{/other_user}","gists_url":"https://api.github.com/users/leofeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/leofeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leofeyer/subscriptions","organizations_url":"https://api.github.com/users/leofeyer/orgs","repos_url":"https://api.github.com/users/leofeyer/repos","events_url":"https://api.github.com/users/leofeyer/events{/privacy}","received_events_url":"https://api.github.com/users/leofeyer/received_events","type":"User","site_admin":false},"body":"How would this be helpful for #204?","created_at":"2015-04-28T09:55:43Z","updated_at":"2015-04-28T09:55:43Z","html_url":"https://github.com/contao/core-bundle/pull/234#discussion_r29228415","pull_request_url":"https://api.github.com/repos/contao/core-bundle/pulls/234","_links":{"self":{"href":"https://api.github.com/repos/contao/core-bundle/pulls/comments/29228415"},"html":{"href":"https://github.com/contao/core-bundle/pull/234#discussion_r29228415"},"pull_request":{"href":"https://api.github.com/repos/contao/core-bundle/pulls/234"}}},"pull_request":{"url":"https://api.github.com/repos/contao/core-bundle/pulls/234","id":34057821,"html_url":"https://github.com/contao/core-bundle/pull/234","diff_url":"https://github.com/contao/core-bundle/pull/234.diff","patch_url":"https://github.com/contao/core-bundle/pull/234.patch","issue_url":"https://api.github.com/repos/contao/core-bundle/issues/234","number":234,"state":"open","locked":false,"title":"[RFC] Split InitializeSystemListener","user":{"login":"dtomasi","id":1616726,"avatar_url":"https://avatars.githubusercontent.com/u/1616726?v=3","gravatar_id":"","url":"https://api.github.com/users/dtomasi","html_url":"https://github.com/dtomasi","followers_url":"https://api.github.com/users/dtomasi/followers","following_url":"https://api.github.com/users/dtomasi/following{/other_user}","gists_url":"https://api.github.com/users/dtomasi/gists{/gist_id}","starred_url":"https://api.github.com/users/dtomasi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtomasi/subscriptions","organizations_url":"https://api.github.com/users/dtomasi/orgs","repos_url":"https://api.github.com/users/dtomasi/repos","events_url":"https://api.github.com/users/dtomasi/events{/privacy}","received_events_url":"https://api.github.com/users/dtomasi/received_events","type":"User","site_admin":false},"body":"see: #192 \r\n\r\nThings that are done:\r\n\r\n- splitted `IntitializeSystemListener` in 8 decoupled listeners\r\n- Listeners in `Contao\\CoreBundle\\EventListener\\Framework` are registered by a `CompilerPass` see: https://github.com/ContaoBlackForest/core-bundle/blob/feature/split-initialize-system-listener/src/ContaoCoreBundle.php#L64\r\n- `InitializeSystemListenerTest` is rewritten to test `contao.framework.boot`-Event is dispatched and how often this happens.\r\n- Some tests for listeners in `Contao\\CoreBundle\\EventListener\\Framework` are already coded\r\n\r\nThings that need to be done:\r\n\r\n- Write tests for all listeners in `Contao\\CoreBundle\\EventListener\\Framework`\r\n- Write a test-setup that loads all required services and parameters to load the framework. This is needed for other Tests like `AddToSearchIndexListenerTest`.\r\n\r\nThings that need to be discussed:\r\n\r\n- basic structure\r\n- naming of listeners\r\n- should the listeners bei separated from listeners in `listeners.yml`? maybe `listeners_framework.yml` ? \r\n- should we also create a `contao.framework.terminate` and `contao.framework.exception`- Event ?\r\n\r\nWhat are your opinions ?","created_at":"2015-04-24T15:16:39Z","updated_at":"2015-04-28T09:55:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5752902f6a42e8c2584c6233a84ffc29efe937d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/contao/core-bundle/pulls/234/commits","review_comments_url":"https://api.github.com/repos/contao/core-bundle/pulls/234/comments","review_comment_url":"https://api.github.com/repos/contao/core-bundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/contao/core-bundle/issues/234/comments","statuses_url":"https://api.github.com/repos/contao/core-bundle/statuses/44b2e36f7a4acb456d5e66f4e8c8103bb40869f1","head":{"label":"ContaoBlackForest:feature/split-initialize-system-listener","ref":"feature/split-initialize-system-listener","sha":"44b2e36f7a4acb456d5e66f4e8c8103bb40869f1","user":{"login":"ContaoBlackForest","id":10738142,"avatar_url":"https://avatars.githubusercontent.com/u/10738142?v=3","gravatar_id":"","url":"https://api.github.com/users/ContaoBlackForest","html_url":"https://github.com/ContaoBlackForest","followers_url":"https://api.github.com/users/ContaoBlackForest/followers","following_url":"https://api.github.com/users/ContaoBlackForest/following{/other_user}","gists_url":"https://api.github.com/users/ContaoBlackForest/gists{/gist_id}","starred_url":"https://api.github.com/users/ContaoBlackForest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ContaoBlackForest/subscriptions","organizations_url":"https://api.github.com/users/ContaoBlackForest/orgs","repos_url":"https://api.github.com/users/ContaoBlackForest/repos","events_url":"https://api.github.com/users/ContaoBlackForest/events{/privacy}","received_events_url":"https://api.github.com/users/ContaoBlackForest/received_events","type":"Organization","site_admin":false},"repo":{"id":34377538,"name":"core-bundle","full_name":"ContaoBlackForest/core-bundle","owner":{"login":"ContaoBlackForest","id":10738142,"avatar_url":"https://avatars.githubusercontent.com/u/10738142?v=3","gravatar_id":"","url":"https://api.github.com/users/ContaoBlackForest","html_url":"https://github.com/ContaoBlackForest","followers_url":"https://api.github.com/users/ContaoBlackForest/followers","following_url":"https://api.github.com/users/ContaoBlackForest/following{/other_user}","gists_url":"https://api.github.com/users/ContaoBlackForest/gists{/gist_id}","starred_url":"https://api.github.com/users/ContaoBlackForest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ContaoBlackForest/subscriptions","organizations_url":"https://api.github.com/users/ContaoBlackForest/orgs","repos_url":"https://api.github.com/users/ContaoBlackForest/repos","events_url":"https://api.github.com/users/ContaoBlackForest/events{/privacy}","received_events_url":"https://api.github.com/users/ContaoBlackForest/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ContaoBlackForest/core-bundle","description":"Contao 4 core bundle","fork":true,"url":"https://api.github.com/repos/ContaoBlackForest/core-bundle","forks_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/forks","keys_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/teams","hooks_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/hooks","issue_events_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/issues/events{/number}","events_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/events","assignees_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/assignees{/user}","branches_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/branches{/branch}","tags_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/tags","blobs_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/statuses/{sha}","languages_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/languages","stargazers_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/stargazers","contributors_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/contributors","subscribers_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/subscribers","subscription_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/subscription","commits_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/contents/{+path}","compare_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/merges","archive_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/downloads","issues_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/issues{/number}","pulls_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/pulls{/number}","milestones_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/milestones{/number}","notifications_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/labels{/name}","releases_url":"https://api.github.com/repos/ContaoBlackForest/core-bundle/releases{/id}","created_at":"2015-04-22T08:09:21Z","updated_at":"2015-04-22T08:09:24Z","pushed_at":"2015-04-28T09:45:40Z","git_url":"git://github.com/ContaoBlackForest/core-bundle.git","ssh_url":"git@github.com:ContaoBlackForest/core-bundle.git","clone_url":"https://github.com/ContaoBlackForest/core-bundle.git","svn_url":"https://github.com/ContaoBlackForest/core-bundle","homepage":"","size":22378,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"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":"develop"}},"base":{"label":"contao:develop","ref":"develop","sha":"9102031058ef125dab904f902b579469b3d21e12","user":{"login":"contao","id":1206136,"avatar_url":"https://avatars.githubusercontent.com/u/1206136?v=3","gravatar_id":"","url":"https://api.github.com/users/contao","html_url":"https://github.com/contao","followers_url":"https://api.github.com/users/contao/followers","following_url":"https://api.github.com/users/contao/following{/other_user}","gists_url":"https://api.github.com/users/contao/gists{/gist_id}","starred_url":"https://api.github.com/users/contao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contao/subscriptions","organizations_url":"https://api.github.com/users/contao/orgs","repos_url":"https://api.github.com/users/contao/repos","events_url":"https://api.github.com/users/contao/events{/privacy}","received_events_url":"https://api.github.com/users/contao/received_events","type":"Organization","site_admin":false},"repo":{"id":20519851,"name":"core-bundle","full_name":"contao/core-bundle","owner":{"login":"contao","id":1206136,"avatar_url":"https://avatars.githubusercontent.com/u/1206136?v=3","gravatar_id":"","url":"https://api.github.com/users/contao","html_url":"https://github.com/contao","followers_url":"https://api.github.com/users/contao/followers","following_url":"https://api.github.com/users/contao/following{/other_user}","gists_url":"https://api.github.com/users/contao/gists{/gist_id}","starred_url":"https://api.github.com/users/contao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contao/subscriptions","organizations_url":"https://api.github.com/users/contao/orgs","repos_url":"https://api.github.com/users/contao/repos","events_url":"https://api.github.com/users/contao/events{/privacy}","received_events_url":"https://api.github.com/users/contao/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/contao/core-bundle","description":"Contao 4 core bundle","fork":false,"url":"https://api.github.com/repos/contao/core-bundle","forks_url":"https://api.github.com/repos/contao/core-bundle/forks","keys_url":"https://api.github.com/repos/contao/core-bundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/contao/core-bundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/contao/core-bundle/teams","hooks_url":"https://api.github.com/repos/contao/core-bundle/hooks","issue_events_url":"https://api.github.com/repos/contao/core-bundle/issues/events{/number}","events_url":"https://api.github.com/repos/contao/core-bundle/events","assignees_url":"https://api.github.com/repos/contao/core-bundle/assignees{/user}","branches_url":"https://api.github.com/repos/contao/core-bundle/branches{/branch}","tags_url":"https://api.github.com/repos/contao/core-bundle/tags","blobs_url":"https://api.github.com/repos/contao/core-bundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/contao/core-bundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/contao/core-bundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/contao/core-bundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/contao/core-bundle/statuses/{sha}","languages_url":"https://api.github.com/repos/contao/core-bundle/languages","stargazers_url":"https://api.github.com/repos/contao/core-bundle/stargazers","contributors_url":"https://api.github.com/repos/contao/core-bundle/contributors","subscribers_url":"https://api.github.com/repos/contao/core-bundle/subscribers","subscription_url":"https://api.github.com/repos/contao/core-bundle/subscription","commits_url":"https://api.github.com/repos/contao/core-bundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/contao/core-bundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/contao/core-bundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/contao/core-bundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/contao/core-bundle/contents/{+path}","compare_url":"https://api.github.com/repos/contao/core-bundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/contao/core-bundle/merges","archive_url":"https://api.github.com/repos/contao/core-bundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/contao/core-bundle/downloads","issues_url":"https://api.github.com/repos/contao/core-bundle/issues{/number}","pulls_url":"https://api.github.com/repos/contao/core-bundle/pulls{/number}","milestones_url":"https://api.github.com/repos/contao/core-bundle/milestones{/number}","notifications_url":"https://api.github.com/repos/contao/core-bundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/contao/core-bundle/labels{/name}","releases_url":"https://api.github.com/repos/contao/core-bundle/releases{/id}","created_at":"2014-06-05T09:45:55Z","updated_at":"2015-04-24T08:33:13Z","pushed_at":"2015-04-28T09:45:41Z","git_url":"git://github.com/contao/core-bundle.git","ssh_url":"git@github.com:contao/core-bundle.git","clone_url":"https://github.com/contao/core-bundle.git","svn_url":"https://github.com/contao/core-bundle","homepage":"","size":27910,"stargazers_count":7,"watchers_count":7,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":25,"forks":10,"open_issues":25,"watchers":7,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/contao/core-bundle/pulls/234"},"html":{"href":"https://github.com/contao/core-bundle/pull/234"},"issue":{"href":"https://api.github.com/repos/contao/core-bundle/issues/234"},"comments":{"href":"https://api.github.com/repos/contao/core-bundle/issues/234/comments"},"review_comments":{"href":"https://api.github.com/repos/contao/core-bundle/pulls/234/comments"},"review_comment":{"href":"https://api.github.com/repos/contao/core-bundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/contao/core-bundle/pulls/234/commits"},"statuses":{"href":"https://api.github.com/repos/contao/core-bundle/statuses/44b2e36f7a4acb456d5e66f4e8c8103bb40869f1"}}}}