1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-19 07:36:17 +02:00

Upgrade phpstan, phpunit (#1923)

* Upgrade phpstan, phpunit

* Fix phpunit deprecation

* Fix hg tests

* Fix php-console tests

* Fix phpunit on 8.1

* Bump phpconsole
This commit is contained in:
Jordi Boggiano
2024-11-11 15:21:55 +01:00
committed by GitHub
parent 7af6f41cff
commit f43e3d5637
43 changed files with 210 additions and 153 deletions

View File

@@ -27,11 +27,12 @@ class ErrorLogHandler extends AbstractProcessingHandler
public const OPERATING_SYSTEM = 0;
public const SAPI = 4;
/** @var 0|1|3|4 */
protected int $messageType;
protected bool $expandNewlines;
/**
* @param int $messageType Says where the error should go.
* @param 0|1|3|4 $messageType Says where the error should go.
* @param bool $expandNewlines If set to true, newlines in the message will be expanded to be take multiple log entries
*
* @throws \InvalidArgumentException If an unsupported message type is set
@@ -84,7 +85,7 @@ class ErrorLogHandler extends AbstractProcessingHandler
if ($lines === false) {
$pcreErrorCode = preg_last_error();
throw new \RuntimeException('Failed to preg_split formatted string: ' . $pcreErrorCode . ' / '. Utils::pcreLastErrorMessage($pcreErrorCode));
throw new \RuntimeException('Failed to preg_split formatted string: ' . $pcreErrorCode . ' / '. preg_last_error_msg());
}
foreach ($lines as $line) {
error_log($line, $this->messageType);