8000 [VarDumper] fix tests when xdebug is enabled by FrancescoBorzi · Pull Request #20785 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[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

Closed

Conversation

FrancescoBorzi
Copy link
Contributor
Q A
Branch? 2.7
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #20778
License MIT

@@ -147,6 +147,10 @@ class: "Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest"
*/
public function testGenerator()
{
if (extension_loaded('xdebug')) {
Copy link
Member

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.

Copy link
Member

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)

@stof
Copy link
Member
stof commented Dec 6, 2016

note to mergers: this should go in older branches

@FrancescoBorzi
Copy link
Contributor Author

@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) {
Copy link
Member

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)

@FrancescoBorzi
Copy link
Contributor Author

@nicolas-grekas done, thanks

@stof can you please answer my question in that other PR?

@nicolas-grekas nicolas-grekas added this to the 2.7 milestone Dec 6, 2016
@nicolas-grekas
Copy link
Member

Thank you @ShinDarth.

nicolas-grekas added a commit that referenced this pull request Dec 6, 2016
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
@FrancescoBorzi FrancescoBorzi deleted the fix-xdebug-tests branch December 28, 2016 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0