{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/17052","labels_url":"https://api.github.com/repos/symfony/symfony/issues/17052/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/17052/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/17052/events","html_url":"https://github.com/symfony/symfony/pull/17052","id":122749080,"number":17052,"title":"[2.7] Fixed flatten exception recursion with errors","user":{"login":"GrahamCampbell","id":2829600,"avatar_url":"https://avatars.githubusercontent.com/u/2829600?v=3","gravatar_id":"","url":"https://api.github.com/users/GrahamCampbell","html_url":"https://github.com/GrahamCampbell","followers_url":"https://api.github.com/users/GrahamCampbell/followers","following_url":"https://api.github.com/users/GrahamCampbell/following{/other_user}","gists_url":"https://api.github.com/users/GrahamCampbell/gists{/gist_id}","starred_url":"https://api.github.com/users/GrahamCampbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrahamCampbell/subscriptions","organizations_url":"https://api.github.com/users/GrahamCampbell/orgs","repos_url":"https://api.github.com/users/GrahamCampbell/repos","events_url":"https://api.github.com/users/GrahamCampbell/events{/privacy}","received_events_url":"https://api.github.com/users/GrahamCampbell/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/symfony/symfony/labels/Bug","name":"Bug","color":"e10c02"},{"url":"https://api.github.com/repos/symfony/symfony/labels/Status:%20Needs%20Work","name":"Status: Needs Work","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-12-17T14:49:31Z","updated_at":"2015-12-22T11:26:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/17052","html_url":"https://github.com/symfony/symfony/pull/17052","diff_url":"https://github.com/symfony/symfony/pull/17052.diff","patch_url":"https://github.com/symfony/symfony/pull/17052.patch"},"body":"| Q             | A\r\n| ------------- | ---\r\n| Bug fix?      | yes\r\n| New feature?  | no\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Tests pass?   | yes\r\n| Fixed tickets | N/A\r\n| License       | MIT\r\n| Doc PR        | N/A\r\n\r\nConsider the following code:\r\n\r\n```php\r\n$error = new ParseError();\r\n\r\n$exception = new RuntimeException($error->getMessage(), $error->getCode(), $error);\r\n\r\n$flat = new Symfony\\Component\\Debug\\Exception\\FlattenException($exception);\r\n```\r\n\r\nWithout this fix, that code is broken.\r\n\r\nYou'll end up with something like this:\r\n\r\n```\r\nFatalThrowableError in FlattenException.php line 76:\r\nType error: Argument 1 passed to Symfony\\Component\\Debug\\Exception\\FlattenException::create() must be an instance of Exception, instance of ParseError given\r\n```\r\n\r\n---\r\n\r\nI came across this error issue in https://github.com/laravel/framework/issues/11329."},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/166588981","html_url":"https://github.com/symfony/symfony/pull/17052#issuecomment-166588981","issue_url":"https://api.github.com/repos/symfony/symfony/issues/17052","id":166588981,"user":{"login":"GrahamCampbell","id":2829600,"avatar_url":"https://avatars.githubusercontent.com/u/2829600?v=3","gravatar_id":"","url":"https://api.github.com/users/GrahamCampbell","html_url":"https://github.com/GrahamCampbell","followers_url":"https://api.github.com/users/GrahamCampbell/followers","following_url":"https://api.github.com/users/GrahamCampbell/following{/other_user}","gists_url":"https://api.github.com/users/GrahamCampbell/gists{/gist_id}","starred_url":"https://api.github.com/users/GrahamCampbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrahamCampbell/subscriptions","organizations_url":"https://api.github.com/users/GrahamCampbell/orgs","repos_url":"https://api.github.com/users/GrahamCampbell/repos","events_url":"https://api.github.com/users/GrahamCampbell/events{/privacy}","received_events_url":"https://api.github.com/users/GrahamCampbell/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T11:26:25Z","updated_at":"2015-12-22T11:26:25Z","body":"Sorry, I'll get to this soon. ;)"}}