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

No coverage reported for PHPStorm 2019.2.5 #710

Closed
remorhaz opened this issue Nov 20, 2019 · 4 comments
Closed

No coverage reported for PHPStorm 2019.2.5 #710

remorhaz opened this issue Nov 20, 2019 · 4 comments

Comments

@remorhaz
Copy link

remorhaz commented Nov 20, 2019

Q A
php-code-coverage version 7.0.9
PHP version 7.3.11
Driver Xdebug
Xdebug version (if used) 2.8.0
Installation Method Composer
Usage Method PHPUnit
PHPUnit version (if used) 8.4.3

After updating from 7.0.8 to 7.0.9 PHPStorm 2109.2.5 stops showing the coverage when running tests from IDE. No errors in IDE logs, it just behaves like all the code is excluded from coverage. Downgrading to 7.0.8 solves the problem, so the cause is probably in last php-code-coverage release.

phpunit.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<phpunit
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.4/phpunit.xsd"
        forceCoversAnnotation="true"
        colors="true"
        defaultTestSuite="unit">
    <testsuites>
        <testsuite name="unit">
            <directory>tests/</directory>
        </testsuite>
    </testsuites>
    <filter>
        <whitelist
                processUncoveredFilesFromWhitelist="true">
            <directory suffix=".php">src/</directory>
        </whitelist>
    </filter>
</phpunit>
@sebastianbergmann
Copy link
Owner

sebastianbergmann commented Nov 20, 2019

While I use PhpStorm, I do not use its UI to run tests or look at coverage. Therefore I cannot reproduce the issue.

Can you narrow down which of the commits made between 7.0.8 and 7.0.9 is responsible for this?

Also, can you check whether code coverage works for you outside of PhpStorm? Thanks!

@sebastianbergmann
Copy link
Owner

The only thing that would make sense to be the cause for this is #705 (and #706). CC @danielpalme

@remorhaz
Copy link
Author

This is the change that brought the problem. Rolling back to $xmlFile->setAttribute('name', $item->getPath()); in Report/Clover.php solves the issue.

@sebastianbergmann
Copy link
Owner

I have reverted #705 and #706 and have released 7.0.10. Thanks!

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