Skip to content
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

Specifying xdebug2 and PHP 8 installs xdebug3 instead #519

Closed
3 of 5 tasks
danepowell opened this issue Oct 14, 2021 · 2 comments
Closed
3 of 5 tasks

Specifying xdebug2 and PHP 8 installs xdebug3 instead #519

danepowell opened this issue Oct 14, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@danepowell
Copy link

Describe the bug
If you specify the following...

- uses: shivammathur/setup-php@v2
   with:
     php-version: "8.0"
     coverage: xdebug2

You actually get PHP 8.0 and Xdebug 3. Since Xdebug 2 and PHP 8.0 are an invalid combination, I would expect an error to be generated instead of silently installing Xdebug 3.

Version

  • I have checked releases, and the bug exists in the latest patch version of v1 or v2.
  • v2
  • v1

Runners

  • GitHub Hosted
  • Self Hosted

Operating systems
Linux

@danepowell danepowell added the bug Something isn't working label Oct 14, 2021
@danepowell danepowell changed the title Using 'xdebug2' with PHP 8 should produce an error Specifying xdebug2 and PHP 8 installs xdebug3 instead Oct 14, 2021
@shivammathur
Copy link
Owner

shivammathur commented Nov 25, 2021

@danepowell

Fixed in 2.16.0

Now, It will fail to set up Xdebug when xdebug2 is specified as the coverage driver on PHP 8.0 and above. Same for xdebug3 for PHP 7.1 and lower. It will leave an error in the logs.

- name: Setup PHP
  uses: shivammathur/setup-php@v2
  with:
    php-version: ${{ matrix.php }}
    coverage: xdebug2

If you want your workflow to fail at this error, you can set fail-fast environment variable to true.

- name: Setup PHP
  uses: shivammathur/setup-php@v2        
  env:
    fail-fast: true
  with:
    php-version: ${{ matrix.php }}
    coverage: xdebug2

@danepowell
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants