View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001691 | Xdebug | Code Coverage | public | 2019-08-01 10:27 | 2019-08-26 12:37 |
Reporter | xthiago | Assigned To | derick | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.8.0beta1 | ||||
Target Version | 2.8.0dev | Fixed in Version | 2.8.0beta2 | ||
Summary | 0001691: Incorrect detection: line executed is marked as not executed | ||||
Description | When I was analyzing the code coverage using PHPUnit I saw that <code php>
</code> The report: {{https://user-images.githubusercontent.com/720151/61863128-680c8a80-aea5-11e9-8263-fea4152b8719.png}} It is detected correctly if I a change that the structure of statements to call everything in one line: <code php>
</code> {{https://user-images.githubusercontent.com/720151/61863467-0862af00-aea6-11e9-8b09-1bf5b7e20d42.png}} Or if I split the <code php>
</code> {{https://user-images.githubusercontent.com/720151/61863607-51b2fe80-aea6-11e9-9aa6-17c51bb91daf.png}} | ||||
Steps To Reproduce | Here's the class with the line detected incorrectly: https://github.com/xthiago/php-code-coverage-with-incorrect-line-detection/blob/master/src/Sample.php Here's a scenario test case using Docker with steps to reproduce: https://github.com/xthiago/php-code-coverage-with-incorrect-line-detection. | ||||
Additional Information | PHP 7.4.0beta1 Previously I reported the issue on https://github.com/sebastianbergmann/php-code-coverage/issues/687. Now it's closed because they said it's an Xdebug bug. | ||||
Tags | No tags attached. | ||||
Attached Files | Sample.php (341 bytes)
<?php declare(strict_types=1); namespace Xthiago; use Assert\Assert; class Sample { public function __construct(string $latitude, string $longitude) { Assert::lazy() ->that($latitude, 'latitude')->range(-90, 90) ->that($longitude, 'longitude')->range(-140, 140) ->verifyNow(); } } | ||||
Operating System | |||||
PHP Version | 7.4-dev | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2019-08-01 10:27 | xthiago | New Issue | |
2019-08-01 10:27 | xthiago | File Added: Sample.php | |
2019-08-01 14:07 | derick | Status | new => assigned |
2019-08-01 14:07 | derick | Target Version | => 2.8.0dev |
2019-08-02 10:50 | derick | Assigned To | => derick |
2019-08-02 10:50 | derick | Status | assigned => closed |
2019-08-02 10:50 | derick | Resolution | open => fixed |
2019-08-02 10:50 | derick | Fixed in Version | => 2.8.0dev |
2019-08-02 10:50 | derick | Note Added: 0005099 | |
2019-08-26 12:37 | derick | Fixed in Version | 2.8.0dev => 2.8.0beta2 |