PHP Manual says that the handler signature must be like this:
handler(
int $errno,
string $errstr,
string $errfile = ?,
int $errline = ?,
array $errcontext = ?
): bool
However, there are many libraries that return void or null. My Laravel project with Larastan crashes on phpstan analyze.
In XXX.php line xxx:
During inheritance of IteratorAggregate: Uncaught TypeError: Kcs\ClassFinder\Util\ErrorHandler::handleError(): Return value must be o
f type bool, null returned in /project/vendor/kcs/class-finder/lib/Util/ErrorHandler.php:52
PHP Manual says that the handler signature must be like this:
However, there are many libraries that return
void
ornull
. My Laravel project with Larastan crashes onphpstan analyze
.