Open
Description
Q | A |
---|---|
PHPUnit version | 12.0.6 |
PHP version | 8.4.3 |
Installation Method | Composer |
Summary
PHPUnit generates a baseline file that contains absolute paths, if the baseline file is written to a subdirectory.
This causes issues in CI, because the paths don't match.
This issue is probably related: #5920
Current behavior
This command creates a file containing absolute file paths:
vendor/bin/phpunit --generate-baseline tests/deprecations-baseline.xml
$ cat tests/deprecations-baseline.xml
<?xml version="1.0"?>
<files version="1">
<file path="/var/www/html/tests/ExampleTest.php">
<line number="28" hash="a4975a3769fa8b53b7712f2e2f709bf3c1424ec3">
<issue>__</issue>
...
As mentioned above, when the deprecation file is created in the root directory, the file contains relative paths (as expected).
How to reproduce
vendor/bin/phpunit --generate-baseline tests/deprecations-baseline.xml
Expected behavior
I expected that the deprecation file always contains relative file paths, whether it's created in the root directory or in a subdirectory.