sebastianbergmann / phpcov

TextUI frontend for php-code-coverage
BSD 3-Clause "New" or "Revised" License
223 stars 58 forks source link

Support for PHPUnit 10.2 #132

Closed dqualmann closed 11 months ago

dqualmann commented 1 year ago

phpcov.phar 9.0.0 by phive comes with phpunit 10.0.7. If i use .cov files generated by phpunit 10.2, phpcov merge outputs: PHP Deprecated: Creation of dynamic property SebastianBergmann\CodeCoverage\CodeCoverage::$linesToBeIgnored is deprecated in xy.cov on line 2.

The merged xml file looks like:

<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1686207524">
  <project timestamp="1686207524">
    <metrics files="0" loc="0" ncloc="0" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="0" coveredstatements="0" elements="0" coveredelements="0"/>
  </project>
</coverage>

It is possible to get a phpcov.phar version with phpunit 10.2?

I known, phpcov by composer uses the same phpunit version which is defined in composer.json and it works. But i hope to use phpcov.phar.

Info: php-code-coverage version in phpcov.phar 9.0 is 10.0.0, phpunit 10.2 uses php-code-coverage version 10.1.2

afflerbach commented 11 months ago

Found those in my logs as well:

PHP Deprecated:  Creation of dynamic property SebastianBergmann\CodeCoverage\StaticAnalysis\CachingFileAnalyser::$ignoreDeprecatedCode is deprecated
PHP Deprecated:  Creation of dynamic property SebastianBergmann\CodeCoverage\StaticAnalysis\CachingFileAnalyser::$useAnnotationsForIgnoringCode is deprecated
PHP Deprecated:  Creation of dynamic property SebastianBergmann\CodeCoverage\CodeCoverage::$cachedReport is deprecated
sebastianbergmann commented 11 months ago

I just released phpcov 9.0.1 with no functional changes, only an updated PHAR with updated dependencies. Hope that helps. Unfortunately, I do not have time right now to properly work on PHPCOV as much as I would like.

afflerbach commented 11 months ago

Thank you @sebastianbergmann, the deprecation notices are gone now (phpcov 9.0.2). :+1: