Find why a suppressed warning still throws and why later tests inherit this conversion policy.
php
<?php
function withStrictWarnings(callable $operation): mixed
{
set_error_handler(
static function (int $severity, string $message, string $file, int $line): bool {
throw new ErrorException($message, 0, $severity, $file, $line);
},
);
return $operation();
}