-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Reading from non-existent file test-results
in cache folder
#5764
Comments
This is likely caused by @staabm's change in #5742. It was previously reported by @Yurunsoft in #5742 (comment). @cracksalad Are you using a custom error handler that is too eager, eg. handles issues that it is not responsible for? |
Yes, I am using a pretty typical set_error_handler(function(int $err_lvl, string $err_msg, string $err_file, int $err_line): bool {
throw new \ErrorException($err_msg, 0, $err_lvl, $err_file, $err_line);
}); |
It is bad practice to handle errors that are not your own, more so when they are suppressed. |
yeah I agree. this error handler is bogus and is missing the logic to ignore lines which are prefixed with the manual describes how to do it right https://www.php.net/manual/en/function.set-error-handler.php#refsect1-function.set-error-handler-examples let me make the initial patch a bit more forgiving |
Summary
Best description is probably the exception itself:
Although this snippet shows the result with PHP 8.3.0 and PHPUnit 10.5.13, the same problem is observed using the version combinations stated above.
Current behavior
See Summary
How to reproduce
.phpunit.cache
folderThe cache folder does not exist in CI pipelines e.g. in GitLab (at least if you do not push it to your repo).
Expected behavior
I guess there should be a check, if the file exists before reading it. The problem could also be, that the file should have been created before it is read.
Additional Information
PHPUnit 10.5.10 and 10.5.12 work fine. I did not test other versions yet.
The text was updated successfully, but these errors were encountered: