-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[VarDumper] fix tests when xdebug is enabled #20785
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
Q | A |
---|---|
Branch? | 2.7 |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #20778 |
License | MIT |
- Disabled some test cases when xdebug is enabled, see [VarDumper] Tests failing #20778
@@ -147,6 +147,10 @@ class: "Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest" | |||
*/ | |||
public function testGenerator() | |||
{ | |||
if (extension_loaded('xdebug')) { |
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.
should be skipped only when xdebug.overload_var_dump
is set to 2:
- 0 does not overload var_dump at all
- 1 overloads it only with formatting, which does not break our tests AFAIK
- 2 adds the location to the formatted output.
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.
This is true, but for the next patch (this one is independent from var_dump)
note to mergers: this should go in older branches |
@stof done, changed the IF condition |
@@ -147,6 +147,10 @@ class: "Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest" | |||
*/ | |||
public function testGenerator() | |||
{ | |||
if (ini_get('xdebug.overload_var_dump') == 2) { |
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.
sorry if the previous comment wasn't clear enough :)
this specific test should use extension_loaded as before (and the next check is now fine)
@nicolas-grekas done, thanks @stof can you please answer my question in that other PR? |
Thank you @ShinDarth. |
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #20785). Discussion ---------- [VarDumper] fix tests when xdebug is enabled | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #20778 | License | MIT - Disabled some test cases when xdebug is enabled, see #20778 Commits ------- 488ebbf [VarDumper] fix tests when xdebug is enabled