-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[VarDumper] Add a caster for the FlattenException #49853
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d9a6e8c
to
9842dc0
Compare
public static function castFlattenException(FlattenException $e, array $a, Stub $stub, bool $isNested) | ||
{ | ||
if ($isNested) { | ||
$k = sprintf(Caster::PATTERN_PRIVATE, FlattenException::class, 'traceAsString'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated to benefit from #49852 ;)
@@ -354,4 +355,33 @@ public function testAnonymous() | |||
|
|||
$this->assertDumpMatchesFormat($expectedDump, $e, Caster::EXCLUDE_VERBOSE); | |||
} | |||
|
|||
/** | |||
* @requires function \Symfony\Component\ErrorHandler\Exception\FlattenException::create |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@requires
FTW
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! Nice. I check for requires class
but it didn't exist. Nice usage of "function"
Thank you @lyrixx. |
This PR was merged into the 6.3 branch. Discussion ---------- Fix the test for casting FlattenException on Windows | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | n/a | License | MIT | Doc PR | n/a The assertion should avoid forcing to show path separators, as done in other tests of the caster, as path separators are different on Windows. This fixes the test introduced in #49853 Commits ------- 1464e1e Fix the test for casting FlattenException on Windows
The information is duplicated, and when debuging messenger errors, the output is way too verbose.
This PR enchance the situation.