Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Closed
GrahamCampbell wants to merge4 commits intosymfony:2.7fromunknown repository
Closed

[2.7] Fixed flatten exception recursion with errors#17052

GrahamCampbell wants to merge4 commits intosymfony:2.7fromunknown repository

Conversation

@GrahamCampbell
Copy link
Contributor

QA
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsN/A
LicenseMIT
Doc PRN/A

Consider the following code:

$error =newParseError();$exception =newRuntimeException($error->getMessage(),$error->getCode(),$error);$flat =newSymfony\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.

@stof
Copy link
Member

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
Copy link
ContributorAuthor

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
Copy link
ContributorAuthor

How does this look then?

@nicolas-grekas
Copy link
Member

👍
And if you manage to add a test case I would be +2 :)

@GrahamCampbell
Copy link
ContributorAuthor

I'll add a couple of tests in a few hours.

@nicolas-grekas
Copy link
Member

Status: needs work

@GrahamCampbell
Copy link
ContributorAuthor

Sorry, I'll get to this soon. ;)

@GrahamCampbell
Copy link
ContributorAuthor

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
Copy link
ContributorAuthor

Yeh, PHP 5.4 and 5.5 are running no tests for some reason. :/

@GrahamCampbell
Copy link
ContributorAuthor

This travis issue is affecting the entire code base. For example, one of your PRs didn't get the tests run:#17104.

@nicolas-grekas
Copy link
Member

5.4 and 5.5 are skipped for PRs so that we get more slots on travis

@GrahamCampbell
Copy link
ContributorAuthor

Ah, right, so it was intentional. That makes sense. I was just worried that they were getting silently skipped. ;)

@GrahamCampbell
Copy link
ContributorAuthor

They still waste about 50 seconds of time though each. :(

@nicolas-grekas
Copy link
Member

Yep... I found no way to be quicker, the slow part is apt-get, which can't be skipped AFAIK

@GrahamCampbell
Copy link
ContributorAuthor

Test passing now btw. ;)

@nicolas-grekas
Copy link
Member

👍

@GrahamCampbell
Copy link
ContributorAuthor

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
Copy link
Member

Thank you@GrahamCampbell.

fabpot added a commit that referenced this pull requestDec 26, 2015
…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
@fabpotfabpot closed thisDec 26, 2015
@GrahamCampbellGrahamCampbell deleted the 2.7-throwable branchDecember 26, 2015 12:18
@GrahamCampbell
Copy link
ContributorAuthor

:)

fabpot added a commit that referenced this pull requestDec 26, 2015
…s (GrahamCampbell)"This reverts commitaf3f4ea, reversingchanges made to021ab8a.
fabpot added a commit that referenced this pull requestDec 26, 2015
* 2.3:  Revert "bug#17052 [2.7] Fixed flatten exception recursion with errors (GrahamCampbell)"
fabpot added a commit that referenced this pull requestDec 26, 2015
This was referencedDec 26, 2015
nicolas-grekas added a commit that referenced this pull requestDec 28, 2015
* 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
nicolas-grekas added a commit that referenced this pull requestDec 28, 2015
* 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
nicolas-grekas added a commit that referenced this pull requestDec 28, 2015
* 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
ostrolucky pushed a commit to ostrolucky/symfony that referenced this pull requestMar 25, 2018
* 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
ostrolucky pushed a commit to ostrolucky/symfony that referenced this pull requestMar 25, 2018
* 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
ostrolucky pushed a commit to ostrolucky/symfony that referenced this pull requestMar 25, 2018
* 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
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@GrahamCampbell@stof@nicolas-grekas@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp