Skip to content

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

@kalvisbuls

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.

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy