mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-28 11:07:52 +00:00
684c677937
Intl is only a "suggested" extension. A lot of the NumberFormat Wizard code depends on it. That's insufficient reason to make it required, but the suggestion text now mentions this dependency explicitly. Also clean up the Wizard documentation to reflect some changes since PhpSpreadsheet 1.28.
38 lines
883 B
PHP
38 lines
883 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
setlocale(LC_ALL, 'en_US.utf8');
|
|
ini_set('error_reporting', (string) E_ALL);
|
|
|
|
function phpunit10ErrorHandler(int $errno, string $errstr, string $filename, int $lineno): bool
|
|
{
|
|
$x = error_reporting() & $errno;
|
|
if (
|
|
in_array(
|
|
$errno,
|
|
[
|
|
E_DEPRECATED,
|
|
E_WARNING,
|
|
E_NOTICE,
|
|
E_USER_DEPRECATED,
|
|
E_USER_NOTICE,
|
|
E_USER_WARNING,
|
|
],
|
|
true
|
|
)
|
|
) {
|
|
if (0 === $x) {
|
|
return true; // message suppressed - stop error handling
|
|
}
|
|
|
|
throw new Exception("$errstr $filename $lineno");
|
|
}
|
|
|
|
return false; // continue error handling
|
|
}
|
|
|
|
if (!method_exists(PHPUnit\Framework\TestCase::class, 'setOutputCallback')) {
|
|
set_error_handler('phpunit10ErrorHandler');
|
|
}
|