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

There is no available coverage driver to be used? Php7.3 Only? #42

Closed
klodoma opened this issue Dec 2, 2020 · 6 comments
Closed

There is no available coverage driver to be used? Php7.3 Only? #42

klodoma opened this issue Dec 2, 2020 · 6 comments

Comments

@klodoma
Copy link

klodoma commented Dec 2, 2020

I have a project and when I use "friends-of-phpspec/phpspec-code-coverage": "^6.0" then it fails in Travis CI for php 7.3. The same configuration passes for php7.4.

If i use "friends-of-phpspec/phpspec-code-coverage": "^5.0" then it works.

I get this error:

Screenshot_139

0.09s$ vendor/bin/phpspec run
In CodeCoverageExtension.php line 60:
                                                     
  There is no available coverage driver to be used.  
                                                     
In Xdebug3Driver.php line 65:
                                                              
  XDEBUG_MODE=coverage or xdebug.mode=coverage has to be set  
                                                              
run [-f|--format FORMAT] [--stop-on-failure] [--no-code-generation] [--no-rerun] [--fake] [-b|--bootstrap BOOTSTRAP] [--no-coverage] [--] [<spec>]
The command "vendor/bin/phpspec run" exited with 1.
cache.2
store build cache

You can find the whole source code/configurations here:

https://github.com/klodoma/portphp-steps/tree/phpspec-fail

@shulard
Copy link
Member

shulard commented Dec 2, 2020

Hello !

That's a weird issue, on our side the PHP7.3 tests are passing. The error came from the Xdebug3Driver class (in phpunit/php-code-coverage package). Have you tried the given suggestion ?

XDEBUG_MODE=coverage or xdebug.mode=coverage has to be set

@shulard
Copy link
Member

shulard commented Dec 2, 2020

Maybe you can just try to add a new specific env var for PHP7.3: XDEBUG_MODE=coverage ?

@klodoma
Copy link
Author

klodoma commented Dec 2, 2020

Yes, indeed strange.

I've added

before_script:
  - export XDEBUG_MODE=coverage

which seems to fix the problem.

@klodoma
Copy link
Author

klodoma commented Dec 2, 2020

Anyway, fixed for the moment, so closing.

@klodoma klodoma closed this as completed Dec 2, 2020
@jaylinski
Copy link
Member

jaylinski commented Dec 2, 2020

Seems to be related to sebastianbergmann/php-code-coverage#834.

@shulard Maybe we should document this... 🤔

@shulard
Copy link
Member

shulard commented Dec 2, 2020

@jaylinski yes you're right. Maybe we can add some details about the different adapters or at least direct the user to some useful links in the README.

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

No branches or pull requests

3 participants