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

Wrong phpunit/php-code-coverage version requirements for version 4.0.0 #37

Open
kalvisbuls opened this issue Nov 1, 2018 · 1 comment

Comments

@kalvisbuls
Copy link

Version 4.0.0 requires phpunit/php-code-coverage version ~4.0||~5.0 but attempts to use code from version 5 regardless.

Lines 82 - 84 of CodeCoverageExtension:

case 'xml':
    $reports['xml'] =  new Report\Xml\Facade(Version::id());
    break;

This doesn't work because class SebastianBergmann\CodeCoverage\Version was only added in version 5.0.0. I'm using 4.0.8 and I'm getting a fatal error instead. An upgrade is not an option, since I'm stuck with PHPUnit 5.7 which requires phpunit/php-code-coverage ^4.0.4 (legacy codebase).

Class Report\Xml\Facade doesn't expect any constructor arguments which means that Version::id() part can be safely removed.

Is there a chance a fix could be released as a 4.0.1? I could fix the issue myself but there's no v4.0 branch to create a pull request to.

@Dragonrun1
Copy link

Try posting this issue again against my branch and we'll see what we can do to help.
https://github.com/Dragonrun1/phpspec-code-coverage/

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

2 participants