Skip to content

fix: resolve issue with xdebug.mode not being set#346

Closed
owenvoke wants to merge 1 commit intoshivammathur:developfrom
owenvoke:bugfix/xdebug-3
Closed

fix: resolve issue with xdebug.mode not being set#346
owenvoke wants to merge 1 commit intoshivammathur:developfrom
owenvoke:bugfix/xdebug-3

Conversation

@owenvoke
Copy link
Copy Markdown
Contributor

@owenvoke owenvoke commented Nov 26, 2020

Related discussion: pestphp/pest#226

Description

When using coverage: xdebug on macOS and Windows (Linux correctly uses Xdebug 2 for now on PHP <=7.4), it appears to fail on PHP 7.x as Xdebug 3 is being installed, rather than Xdebug 2.x. As this bit of code is expecting for coverage: xdebug3 or PHP 8 to add the xdebug.mode=coverage line, this never gets set.

I've created some workflows that tested against all PHP versions back to 5.3, and their compatible PHPUnit version.

On the current version, PHPUnit flags a warning that xdebug.mode=coverage has to be set in php.ini. I'm also not sure why XDEBUG_CC_UNUSED is undefined on PHP 7.2 for macOS and Windows.

In case this PR introduced TypeScript/JavaScript code changes:

  • I have written test cases for the changes in this pull request
  • I have run npm run format before the commit.
  • I have run npm run lint before the commit.
  • I have run npm run release before the commit.
  • npm test returns with no unit test errors and all code covered.

In case this PR edits any scripts:

  • I have checked the edited scripts for syntax.
  • I have tested the changes in an integration test (If yes, provide workflow YAML and link).

@owenvoke owenvoke closed this Nov 26, 2020
@owenvoke
Copy link
Copy Markdown
Contributor Author

Just noticed you've already committed changes to this effect. 👍🏻 fce77af

Thanks @shivammathur for all your work on this.

@owenvoke owenvoke deleted the bugfix/xdebug-3 branch November 26, 2020 17:09
@shivammathur
Copy link
Copy Markdown
Owner

@owenvoke Thanks for testing this, fix will be in next release shortly.

@shivammathur shivammathur mentioned this pull request Nov 26, 2020
@shivammathur
Copy link
Copy Markdown
Owner

@owenvoke Merged in 2.9.0 and the issue should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants