Skip to content

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

Description

@kalvisbuls

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions