Filippo Tessarotto
Filippo Tessarotto
Hi, `match` expression is indeed the most tricky to produce a code-coverage report for in a deterministic manner. I found **many** ways to have inconsistent reports where never executed branches...
Given the following command: ```console $ XDEBUG_MODE=coverage php -r 'require "vendor/autoload.php";xdebug_start_code_coverage(XDEBUG_CC_UNUSED|XDEBUG_CC_DEAD_CODE);(new Foo)->foo("HIT");print_r(xdebug_get_code_coverage()[realpath("src/Foo.php")]);' ``` For which I need to highlight 2 things: 1. It uses composer autoload features 2. The actual...
In `v9.2.20` the `match` coverage report depended on test execution order. I haven't been able to find a solution to this issue, and honestly I lost hope on this one,...
> I think it would be better to have a solution that is sometimes wrong due to test execution order / autoloading runtime behavior than having a solution that appears...
> suggests switching to Infection *Adding* rather than *switching*, actually > The only _practical_ workaround is to replace `match` with `switch` or `if`s Been there, done that. Installing Infection and...
> Would it be only [ede00c7](https://github.com/sebastianbergmann/php-code-coverage/commit/ede00c743467b452a005bcad457887c5012bf4ec) that needs to be reverted to address this? As far as I remember you are correct
I see that the source is linked, but it's very cumbersome to reproduce locally, I didn't manage to achieve the result. @mvorisek can you provide the least amount of files...
@mvorisek the repo doesn't provide all the necessary requirements for the test to run locally, I get many unrelated errors like: ``` 1) Atk4\Ui\Tests\DemosTest::testDemosStatusAndHtmlResponse with data set #0 ('index.php') Atk4\Ui\Exception:...
I honestly have no idea what that's supposed to mean, but in the previous run I get this:  :shrug:
I get L38 counted and uncovered