Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[2.7] Fixed flatten exception recursion with errors#17052
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
stof commentedDec 17, 2015
this is not good, as it looses the debugging info.It might be better to wrap it in a FatalThrowableError to be able to continue the flattening |
GrahamCampbell commentedDec 17, 2015
I'm fine with that if you want me to make that change. I just thought you'd want to separate that behaviour from that class, so I went with skipping. |
GrahamCampbell commentedDec 17, 2015
How does this look then? |
nicolas-grekas commentedDec 18, 2015
👍 |
GrahamCampbell commentedDec 18, 2015
I'll add a couple of tests in a few hours. |
nicolas-grekas commentedDec 22, 2015
Status: needs work |
GrahamCampbell commentedDec 22, 2015
Sorry, I'll get to this soon. ;) |
GrahamCampbell commentedDec 22, 2015
Ping@nicolas-grekas. Not sure what's going on with travis. Looks like it couldn't be arsed to run the tests for some reason? |
GrahamCampbell commentedDec 22, 2015
Yeh, PHP 5.4 and 5.5 are running no tests for some reason. :/ |
GrahamCampbell commentedDec 22, 2015
This travis issue is affecting the entire code base. For example, one of your PRs didn't get the tests run:#17104. |
nicolas-grekas commentedDec 22, 2015
5.4 and 5.5 are skipped for PRs so that we get more slots on travis |
GrahamCampbell commentedDec 22, 2015
Ah, right, so it was intentional. That makes sense. I was just worried that they were getting silently skipped. ;) |
GrahamCampbell commentedDec 22, 2015
They still waste about 50 seconds of time though each. :( |
nicolas-grekas commentedDec 22, 2015
Yep... I found no way to be quicker, the slow part is apt-get, which can't be skipped AFAIK |
GrahamCampbell commentedDec 22, 2015
Test passing now btw. ;) |
nicolas-grekas commentedDec 22, 2015
👍 |
GrahamCampbell commentedDec 26, 2015
Is this good to merge then? I'm just concious that new symfony releases normally happen around a month after the previous ones, and I'd quite like to have this fix included in the next set of releases. BTW, Happy Christmas everyone. 🎄 |
fabpot commentedDec 26, 2015
Thank you@GrahamCampbell. |
…mCampbell)This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes#17052).Discussion----------[2.7] Fixed flatten exception recursion with errors| Q | A| ------------- | ---| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | N/A| License | MIT| Doc PR | N/AConsider the following code:```php$error = new ParseError();$exception = new RuntimeException($error->getMessage(), $error->getCode(), $error);$flat = new Symfony\Component\Debug\Exception\FlattenException($exception);```Without this fix, that code is broken.You'll end up with something like this:```FatalThrowableError in FlattenException.php line 76:Type error: Argument 1 passed to Symfony\Component\Debug\Exception\FlattenException::create() must be an instance of Exception, instance of ParseError given```---I came across this error issue inlaravel/framework#11329.Commits-------2b0721d [2.7] Fixed flatten exception recursion with errors
GrahamCampbell commentedDec 26, 2015
:) |
* 2.3: Revert "bug#17052 [2.7] Fixed flatten exception recursion with errors (GrahamCampbell)"
…th errors (GrahamCampbell)""This reverts commite60889a.
* 2.7: [travis] timeout the sigchild tests at 60s CS: Single line comments should use double slashes (//) and not hash (#). Do not use HttpKernel Extension when not needed for 2.7 Do not use HttpKernel Extension when not needed bumped Symfony version to 2.7.9 updated VERSION for 2.7.8 updated CHANGELOG for 2.7.8 bumped Symfony version to 2.3.37 updated VERSION for 2.3.36 update CONTRIBUTORS for 2.3.36 updated CHANGELOG for 2.3.36 Revert "Revert "bug#17052 [2.7] Fixed flatten exception recursion with errors (GrahamCampbell)"" Revert "bug#17052 [2.7] Fixed flatten exception recursion with errors (GrahamCampbell)" use nowdoc instead of heredocConflicts:src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.phpsrc/Symfony/Component/HttpKernel/Kernel.phpsrc/Symfony/Component/Security/Acl/Dbal/AclProvider.phpsrc/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php
* 2.8: [travis] timeout the sigchild tests at 60s CS: Single line comments should use double slashes (//) and not hash (#). Do not use HttpKernel Extension when not needed for 2.7 Do not use HttpKernel Extension when not needed bumped Symfony version to 2.8.2 updated VERSION for 2.8.1 updated CHANGELOG for 2.8.1 bumped Symfony version to 2.7.9 updated VERSION for 2.7.8 updated CHANGELOG for 2.7.8 bumped Symfony version to 2.3.37 updated VERSION for 2.3.36 update CONTRIBUTORS for 2.3.36 updated CHANGELOG for 2.3.36 Revert "Revert "bug#17052 [2.7] Fixed flatten exception recursion with errors (GrahamCampbell)"" Revert "bug#17052 [2.7] Fixed flatten exception recursion with errors (GrahamCampbell)" use nowdoc instead of heredocConflicts:CHANGELOG-2.3.mdCHANGELOG-2.7.mdCHANGELOG-2.8.mdsrc/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.phpsrc/Symfony/Bundle/WebProfilerBundle/Command/ExportCommand.phpsrc/Symfony/Bundle/WebProfilerBundle/Command/ImportCommand.phpsrc/Symfony/Component/Console/Shell.phpsrc/Symfony/Component/Console/Tests/Helper/LegacyTableHelperTest.phpsrc/Symfony/Component/DependencyInjection/Dumper/PhpDumper.phpsrc/Symfony/Component/HttpKernel/Kernel.php
* 3.0: [travis] timeout the sigchild tests at 60s CS: Single line comments should use double slashes (//) and not hash (#). Do not use HttpKernel Extension when not needed for 2.7 bumped Symfony version to 3.0.2 Do not use HttpKernel Extension when not needed updated VERSION for 3.0.1 updated CHANGELOG for 3.0.1 bumped Symfony version to 2.8.2 updated VERSION for 2.8.1 updated CHANGELOG for 2.8.1 bumped Symfony version to 2.7.9 updated VERSION for 2.7.8 updated CHANGELOG for 2.7.8 bumped Symfony version to 2.3.37 updated VERSION for 2.3.36 update CONTRIBUTORS for 2.3.36 updated CHANGELOG for 2.3.36 Revert "Revert "bug#17052 [2.7] Fixed flatten exception recursion with errors (GrahamCampbell)"" Revert "bug#17052 [2.7] Fixed flatten exception recursion with errors (GrahamCampbell)" use nowdoc instead of heredocConflicts:src/Symfony/Component/HttpKernel/Kernel.php
* 2.7: [travis] timeout the sigchild tests at 60s CS: Single line comments should use double slashes (//) and not hash (#). Do not use HttpKernel Extension when not needed for 2.7 Do not use HttpKernel Extension when not needed bumped Symfony version to 2.7.9 updated VERSION for 2.7.8 updated CHANGELOG for 2.7.8 bumped Symfony version to 2.3.37 updated VERSION for 2.3.36 update CONTRIBUTORS for 2.3.36 updated CHANGELOG for 2.3.36 Revert "Revert "bugsymfony#17052 [2.7] Fixed flatten exception recursion with errors (GrahamCampbell)"" Revert "bugsymfony#17052 [2.7] Fixed flatten exception recursion with errors (GrahamCampbell)" use nowdoc instead of heredocConflicts:src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.phpsrc/Symfony/Component/HttpKernel/Kernel.phpsrc/Symfony/Component/Security/Acl/Dbal/AclProvider.phpsrc/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php
* 2.8: [travis] timeout the sigchild tests at 60s CS: Single line comments should use double slashes (//) and not hash (#). Do not use HttpKernel Extension when not needed for 2.7 Do not use HttpKernel Extension when not needed bumped Symfony version to 2.8.2 updated VERSION for 2.8.1 updated CHANGELOG for 2.8.1 bumped Symfony version to 2.7.9 updated VERSION for 2.7.8 updated CHANGELOG for 2.7.8 bumped Symfony version to 2.3.37 updated VERSION for 2.3.36 update CONTRIBUTORS for 2.3.36 updated CHANGELOG for 2.3.36 Revert "Revert "bugsymfony#17052 [2.7] Fixed flatten exception recursion with errors (GrahamCampbell)"" Revert "bugsymfony#17052 [2.7] Fixed flatten exception recursion with errors (GrahamCampbell)" use nowdoc instead of heredocConflicts:CHANGELOG-2.3.mdCHANGELOG-2.7.mdCHANGELOG-2.8.mdsrc/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.phpsrc/Symfony/Bundle/WebProfilerBundle/Command/ExportCommand.phpsrc/Symfony/Bundle/WebProfilerBundle/Command/ImportCommand.phpsrc/Symfony/Component/Console/Shell.phpsrc/Symfony/Component/Console/Tests/Helper/LegacyTableHelperTest.phpsrc/Symfony/Component/DependencyInjection/Dumper/PhpDumper.phpsrc/Symfony/Component/HttpKernel/Kernel.php
* 3.0: [travis] timeout the sigchild tests at 60s CS: Single line comments should use double slashes (//) and not hash (#). Do not use HttpKernel Extension when not needed for 2.7 bumped Symfony version to 3.0.2 Do not use HttpKernel Extension when not needed updated VERSION for 3.0.1 updated CHANGELOG for 3.0.1 bumped Symfony version to 2.8.2 updated VERSION for 2.8.1 updated CHANGELOG for 2.8.1 bumped Symfony version to 2.7.9 updated VERSION for 2.7.8 updated CHANGELOG for 2.7.8 bumped Symfony version to 2.3.37 updated VERSION for 2.3.36 update CONTRIBUTORS for 2.3.36 updated CHANGELOG for 2.3.36 Revert "Revert "bugsymfony#17052 [2.7] Fixed flatten exception recursion with errors (GrahamCampbell)"" Revert "bugsymfony#17052 [2.7] Fixed flatten exception recursion with errors (GrahamCampbell)" use nowdoc instead of heredocConflicts:src/Symfony/Component/HttpKernel/Kernel.php
Consider the following code:
Without this fix, that code is broken.
You'll end up with something like this:
I came across this error issue inlaravel/framework#11329.