{"action":"created","comment":{"url":"https://api.github.com/repos/symfony/symfony/pulls/comments/23072921","id":23072921,"diff_hunk":"@@ -0,0 +1,135 @@\n+<?php\n+\n+/*\n+ * This file is part of the Symfony package.\n+ *\n+ * (c) Fabien Potencier <fabien@symfony.com>\n+ *\n+ * For the full copyright and license information, please view the LICENSE\n+ * file that was distributed with this source code.\n+ */\n+\n+namespace Symfony\\Bridge\\Twig\\DataCollector;\n+\n+use Symfony\\Component\\HttpKernel\\DataCollector\\DataCollector;\n+use Symfony\\Component\\HttpFoundation\\Request;\n+use Symfony\\Component\\HttpFoundation\\Response;\n+\n+/**\n+ * TwigDataCollector.\n+ *\n+ * @author Fabien Potencier <fabien@symfony.com>\n+ */\n+class TwigDataCollector extends DataCollector\n+{\n+    private $profile;\n+    private $computed;\n+\n+    public function __construct(\\Twig_Profiler_Profile $profile)\n+    {\n+        $this->profile = $profile;\n+    }\n+\n+    /**\n+     * {@inheritdoc}\n+     */\n+    public function collect(Request $request, Response $response, \\Exception $exception = null)","path":"src/Symfony/Bridge/Twig/DataCollector/TwigDataCollector.php","position":37,"original_position":36,"commit_id":"713f1e1b4391b281149877b350aa9f522e3419c7","original_commit_id":"8bd3bba73de14c5f482c942f6366a363b15db3c4","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":"done","created_at":"2015-01-16T10:32:42Z","updated_at":"2015-01-16T10:32:42Z","html_url":"https://github.com/symfony/symfony/pull/13428#discussion_r23072921","pull_request_url":"https://api.github.com/repos/symfony/symfony/pulls/13428","_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments/23072921"},"html":{"href":"https://github.com/symfony/symfony/pull/13428#discussion_r23072921"},"pull_request":{"href":"https://api.github.com/repos/symfony/symfony/pulls/13428"}}},"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/13428","id":27492343,"html_url":"https://github.com/symfony/symfony/pull/13428","diff_url":"https://github.com/symfony/symfony/pull/13428.diff","patch_url":"https://github.com/symfony/symfony/pull/13428.patch","issue_url":"https://api.github.com/repos/symfony/symfony/issues/13428","number":13428,"state":"open","locked":false,"title":"Added a Twig profiler","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":"| 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?   | yes\r\n| Fixed tickets | #6914\r\n| License       | MIT\r\n| Doc PR        | n/a\r\n\r\nThis PR integrates the new Twig 1.18 Profiler (see twigphp/Twig#1597) into Symfony (replace the current TimedTwigEngine) and adds  a new Twig panel.\r\n\r\nThe timers are now available for all rendered templates (TimedTwigEngine was only able to get information from a few of them -- mainly the first template only).\r\n\r\nThe Twig panel gives you a lot of information about the execution of the templates, including a call graph.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/47313/5773885/fdf6756e-9d67-11e4-8dce-5ec20b07eca9.png)\r\n\r\n![image](https://cloud.githubusercontent.com/assets/47313/5773892/0ae24d5c-9d68-11e4-9cbe-767bc31c9152.png)\r\n\r\n![image](https://cloud.githubusercontent.com/assets/47313/5773897/13c0b6b6-9d68-11e4-95a1-b9188aca9651.png)\r\n\r\n![image](https://cloud.githubusercontent.com/assets/47313/5773902/1c5498d8-9d68-11e4-975e-9822385fb836.png)\r\n\r\n![image](https://cloud.githubusercontent.com/assets/47313/5773917/4eba00ba-9d68-11e4-8114-0a2d05eae5ea.png)\r\n","created_at":"2015-01-16T09:12:05Z","updated_at":"2015-01-16T10:32:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ae0900b7cd8c0654e5450aecd192a95f383ec028","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/symfony/symfony/pulls/13428/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony/pulls/13428/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony/pulls/comments/{number}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/13428/comments","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/713f1e1b4391b281149877b350aa9f522e3419c7","head":{"label":"fabpot:twig-profiler","ref":"twig-profiler","sha":"713f1e1b4391b281149877b350aa9f522e3419c7","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},"repo":{"id":458135,"name":"symfony","full_name":"fabpot/symfony","owner":{"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},"private":false,"html_url":"https://github.com/fabpot/symfony","description":"The Symfony PHP framework","fork":true,"url":"https://api.github.com/repos/fabpot/symfony","forks_url":"https://api.github.com/repos/fabpot/symfony/forks","keys_url":"https://api.github.com/repos/fabpot/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabpot/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabpot/symfony/teams","hooks_url":"https://api.github.com/repos/fabpot/symfony/hooks","issue_events_url":"https://api.github.com/repos/fabpot/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/fabpot/symfony/events","assignees_url":"https://api.github.com/repos/fabpot/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/fabpot/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/fabpot/symfony/tags","blobs_url":"https://api.github.com/repos/fabpot/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabpot/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabpot/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabpot/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabpot/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/fabpot/symfony/languages","stargazers_url":"https://api.github.com/repos/fabpot/symfony/stargazers","contributors_url":"https://api.github.com/repos/fabpot/symfony/contributors","subscribers_url":"https://api.github.com/repos/fabpot/symfony/subscribers","subscription_url":"https://api.github.com/repos/fabpot/symfony/subscription","commits_url":"https://api.github.com/repos/fabpot/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabpot/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabpot/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabpot/symfony/issues/comments/{number}","contents_url":"https://api.github.com/repos/fabpot/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/fabpot/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabpot/symfony/merges","archive_url":"https://api.github.com/repos/fabpot/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabpot/symfony/downloads","issues_url":"https://api.github.com/repos/fabpot/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/fabpot/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/fabpot/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/fabpot/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabpot/symfony/labels{/name}","releases_url":"https://api.github.com/repos/fabpot/symfony/releases{/id}","created_at":"2010-01-04T15:41:06Z","updated_at":"2015-01-16T06:39:15Z","pushed_at":"2015-01-16T10:32:28Z","git_url":"git://github.com/fabpot/symfony.git","ssh_url":"git@github.com:fabpot/symfony.git","clone_url":"https://github.com/fabpot/symfony.git","svn_url":"https://github.com/fabpot/symfony","homepage":"http://symfony.com/","size":56934,"stargazers_count":327,"watchers_count":327,"language":"PHP","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":0,"forks":47,"open_issues":0,"watchers":327,"default_branch":"master"}},"base":{"label":"symfony:2.7","ref":"2.7","sha":"d752f741610ff0ece5f67ec8e9d625d11dc3c7f2","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-01-16T02:38:39Z","pushed_at":"2015-01-16T08:11:50Z","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":189650,"stargazers_count":9503,"watchers_count":9503,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":3716,"mirror_url":null,"open_issues_count":792,"forks":3716,"open_issues":792,"watchers":9503,"default_branch":"2.7"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/13428"},"html":{"href":"https://github.com/symfony/symfony/pull/13428"},"issue":{"href":"https://api.github.com/repos/symfony/symfony/issues/13428"},"comments":{"href":"https://api.github.com/repos/symfony/symfony/issues/13428/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony/pulls/13428/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony/pulls/13428/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony/statuses/713f1e1b4391b281149877b350aa9f522e3419c7"}}}}