{"action":"created","comment":{"url":"https://api.github.com/repos/symfony/symfony/pulls/comments/177520938","pull_request_review_id":107406604,"id":177520938,"diff_hunk":"@@ -22,10 +22,11 @@\n         <div id=\"trace-html-{{ index }}\" class=\"sf-toggle-content\">\n         {% set _is_first_user_code = true %}\n         {% for i, trace in exception.trace %}\n-            {% set _display_code_snippet = _is_first_user_code and ('/vendor/' not in trace.file) and ('/var/cache/' not in trace.file) and (trace.file is not empty) %}\n+            {% set _is_vendor_trace = trace.file is not empty and ('/vendor/' in trace.file or '/var/cache/' in trace.file) %}\n+            {% set _display_code_snippet = _is_first_user_code and not _is_vendor_trace %}\n             {% if _display_code_snippet %}{% set _is_first_user_code = false %}{% endif %}\n-            <div class=\"trace-line\">\n-                {{ include('@Twig/Exception/trace.html.twig', { prefix: index, i: i, trace: trace, _display_code_snippet: _display_code_snippet }, with_context = false) }}\n+            <div class=\"trace-line {{ _is_vendor_trace ? 'trace-from-vendor' }}\">\n+                {{ include('@Twig/Exception/trace.html.twig', { prefix: index, i: i, trace: trace, style: _is_vendor_trace ? 'compact' : _display_code_snippet ? 'expanded' }, with_context = false) }}","path":"src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces.html.twig","position":29,"original_position":29,"commit_id":"2e62c94d04050e1d25c0bbf64ed93f1020991423","original_commit_id":"2e62c94d04050e1d25c0bbf64ed93f1020991423","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars3.githubusercontent.com/u/73419?v=4","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"body":"Although you are right, I'd prefer to ignore that edge case: having `/vendor/` in the file path and not being a real vendor. Moreover, in the last iteration of this feature we no longer hide anything, so the user won't miss anything important even in that edge case. Cheers!","created_at":"2018-03-27T18:11:28Z","updated_at":"2018-03-27T18:11:28Z","html_url":"https://github.com/symfony/symfony/pull/26671#discussion_r177520938","pull_request_url":"https://api.github.com/repos/symfony/symfony/pulls/26671","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments/177520938"},"html":{"href":"https://github.com/symfony/symfony/pull/26671#discussion_r177520938"},"pull_request":{"href":"https://api.github.com/repos/symfony/symfony/pulls/26671"}},"in_reply_to_id":177244462},"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/26671","id":177375359,"html_url":"https://github.com/symfony/symfony/pull/26671","diff_url":"https://github.com/symfony/symfony/pull/26671.diff","patch_url":"https://github.com/symfony/symfony/pull/26671.patch","issue_url":"https://api.github.com/repos/symfony/symfony/issues/26671","number":26671,"state":"closed","locked":false,"title":"More compact display of vendor code in exception pages","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars3.githubusercontent.com/u/73419?v=4","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Branch?       | master\r\n| Bug fix?      | no\r\n| New feature?  | yes\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Tests pass?   | yes\r\n| Fixed tickets | #23144\r\n| License       | MIT\r\n| Doc PR        | -\r\n\r\nI like the general idea proposed in #23152 ... but I don't like the implementation ... so this PR is an alternative implementation.\r\n\r\n**UPDATE**: the proposed feature has been completely redesigned. See https://github.com/symfony/symfony/pull/26671#issuecomment-376157869\r\n\r\n~~The idea is to **hide by default all information that comes from \"vendors\"** (`vendor/` or `var/cache/` dir) because that code is out of your reach and you can't change it to fix your error.~~\r\n\r\n~~In practice, each exception trace now would display a `Hide vendors` option enabled by default:~~\r\n\r\n<details>\r\n<summary>Click here to view the outdated images</summary>\r\n\r\n![hide-vendors](https://user-images.githubusercontent.com/73419/37895113-a9d942bc-30e0-11e8-9ff4-191dcb057d60.png)\r\n\r\nIt works like a toggle ... and it's compatible with the overall toggle of each trace header:\r\n\r\n![hide-vendors](https://user-images.githubusercontent.com/73419/37895137-b9e8d406-30e0-11e8-82bd-5729d32aaa63.gif)\r\n\r\nWhen exceptions are complex, the amount of noise removed is massive:\r\n\r\n## Before\r\n\r\n![before](https://user-images.githubusercontent.com/73419/37895233-f9170eea-30e0-11e8-8c21-c514007d44d2.png)\r\n\r\n## After\r\n\r\n![after](https://user-images.githubusercontent.com/73419/37895240-fc2e50c0-30e0-11e8-9e5a-b7a73ba57b47.png)\r\n\r\n</details>","created_at":"2018-03-26T08:34:19Z","updated_at":"2018-03-27T18:11:28Z","closed_at":"2018-03-27T07:07:39Z","merged_at":null,"merge_commit_sha":"20a6ad11c7c0f37f9a30f4da309110b3e2183ca8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":100378,"url":"https://api.github.com/repos/symfony/symfony/labels/Feature","name":"Feature","color":"02e10c","default":false},{"id":237550465,"url":"https://api.github.com/repos/symfony/symfony/labels/Status:%20Reviewed","name":"Status: Reviewed","color":"bfe5bf","default":false},{"id":10786590,"url":"https://api.github.com/repos/symfony/symfony/labels/TwigBundle","name":"TwigBundle","color":"DDDDDD","default":false}],"milestone":{"url":"https://api.github.com/repos/symfony/symfony/milestones/17","html_url":"https://github.com/symfony/symfony/milestone/17","labels_url":"https://api.github.com/repos/symfony/symfony/milestones/17/labels","id":2795131,"number":17,"title":"4.1","description":"https://symfony.com/roadmap?version=4.1#checker","creator":{"login":"nicolas-grekas","id":243674,"avatar_url":"https://avatars3.githubusercontent.com/u/243674?v=4","gravatar_id":"","url":"https://api.github.com/users/nicolas-grekas","html_url":"https://github.com/nicolas-grekas","followers_url":"https://api.github.com/users/nicolas-grekas/followers","following_url":"https://api.github.com/users/nicolas-grekas/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-grekas/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-grekas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-grekas/subscriptions","organizations_url":"https://api.github.com/users/nicolas-grekas/orgs","repos_url":"https://api.github.com/users/nicolas-grekas/repos","events_url":"https://api.github.com/users/nicolas-grekas/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-grekas/received_events","type":"User","site_admin":false},"open_issues":125,"closed_issues":270,"state":"open","created_at":"2017-09-26T15:40:00Z","updated_at":"2018-03-27T16:18:07Z","due_on":"2018-05-31T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/symfony/symfony/pulls/26671/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony/pulls/26671/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/26671/comments","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/2e62c94d04050e1d25c0bbf64ed93f1020991423","head":{"label":"javiereguiluz:continue_23144","ref":"continue_23144","sha":"2e62c94d04050e1d25c0bbf64ed93f1020991423","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars3.githubusercontent.com/u/73419?v=4","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"repo":{"id":15188086,"name":"symfony","full_name":"javiereguiluz/symfony","owner":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars3.githubusercontent.com/u/73419?v=4","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/javiereguiluz/symfony","description":"The Symfony PHP framework","fork":true,"url":"https://api.github.com/repos/javiereguiluz/symfony","forks_url":"https://api.github.com/repos/javiereguiluz/symfony/forks","keys_url":"https://api.github.com/repos/javiereguiluz/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/javiereguiluz/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/javiereguiluz/symfony/teams","hooks_url":"https://api.github.com/repos/javiereguiluz/symfony/hooks","issue_events_url":"https://api.github.com/repos/javiereguiluz/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/javiereguiluz/symfony/events","assignees_url":"https://api.github.com/repos/javiereguiluz/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/javiereguiluz/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/javiereguiluz/symfony/tags","blobs_url":"https://api.github.com/repos/javiereguiluz/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/javiereguiluz/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/javiereguiluz/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/javiereguiluz/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/javiereguiluz/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/javiereguiluz/symfony/languages","stargazers_url":"https://api.github.com/repos/javiereguiluz/symfony/stargazers","contributors_url":"https://api.github.com/repos/javiereguiluz/symfony/contributors","subscribers_url":"https://api.github.com/repos/javiereguiluz/symfony/subscribers","subscription_url":"https://api.github.com/repos/javiereguiluz/symfony/subscription","commits_url":"https://api.github.com/repos/javiereguiluz/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/javiereguiluz/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/javiereguiluz/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/javiereguiluz/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/javiereguiluz/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/javiereguiluz/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/javiereguiluz/symfony/merges","archive_url":"https://api.github.com/repos/javiereguiluz/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/javiereguiluz/symfony/downloads","issues_url":"https://api.github.com/repos/javiereguiluz/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/javiereguiluz/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/javiereguiluz/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/javiereguiluz/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/javiereguiluz/symfony/labels{/name}","releases_url":"https://api.github.com/repos/javiereguiluz/symfony/releases{/id}","deployments_url":"https://api.github.com/repos/javiereguiluz/symfony/deployments","created_at":"2013-12-14T15:54:02Z","updated_at":"2015-11-05T11:38:17Z","pushed_at":"2018-03-27T16:11:29Z","git_url":"git://github.com/javiereguiluz/symfony.git","ssh_url":"git@github.com:javiereguiluz/symfony.git","clone_url":"https://github.com/javiereguiluz/symfony.git","svn_url":"https://github.com/javiereguiluz/symfony","homepage":"symfony.com","size":111186,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"symfony:master","ref":"master","sha":"4a602ca6529090197e09555796b27500111aee31","user":{"login":"symfony","id":143937,"avatar_url":"https://avatars3.githubusercontent.com/u/143937?v=4","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://avatars3.githubusercontent.com/u/143937?v=4","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}","deployments_url":"https://api.github.com/repos/symfony/symfony/deployments","created_at":"2010-01-04T14:21:21Z","updated_at":"2018-03-27T17:24:08Z","pushed_at":"2018-03-27T17:33:03Z","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":"https://symfony.com","size":115482,"stargazers_count":17082,"watchers_count":17082,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":6122,"mirror_url":null,"archived":false,"open_issues_count":806,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":6122,"open_issues":806,"watchers":17082,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/26671"},"html":{"href":"https://github.com/symfony/symfony/pull/26671"},"issue":{"href":"https://api.github.com/repos/symfony/symfony/issues/26671"},"comments":{"href":"https://api.github.com/repos/symfony/symfony/issues/26671/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony/pulls/26671/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony/pulls/26671/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony/statuses/2e62c94d04050e1d25c0bbf64ed93f1020991423"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"javiereguiluz"}}