mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 06:28:46 +02:00
N°5809 Fix compilation error due to CASLogger VS LoggerInterface in psr/log
"Declaration of Combodo\iTop\Cas\CASLogger::emergency($message, array $context = []) must be compatible with Psr\Log\LoggerInterface::emergency(Stringable|string $message, array $context = [])" psr/log 3.0.0 brings the BC break Switching to 2.0.0 is nice as it will bring improvements for PHP 8.0+ ! So adding psr/log ^2.0.0 to composer.json
This commit is contained in:
@@ -20,7 +20,7 @@ trait LoggerTrait
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function emergency(string|\Stringable $message, array $context = []): void
|
||||
public function emergency(string|\Stringable $message, array $context = [])
|
||||
{
|
||||
$this->log(LogLevel::EMERGENCY, $message, $context);
|
||||
}
|
||||
@@ -36,7 +36,7 @@ trait LoggerTrait
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function alert(string|\Stringable $message, array $context = []): void
|
||||
public function alert(string|\Stringable $message, array $context = [])
|
||||
{
|
||||
$this->log(LogLevel::ALERT, $message, $context);
|
||||
}
|
||||
@@ -51,7 +51,7 @@ trait LoggerTrait
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function critical(string|\Stringable $message, array $context = []): void
|
||||
public function critical(string|\Stringable $message, array $context = [])
|
||||
{
|
||||
$this->log(LogLevel::CRITICAL, $message, $context);
|
||||
}
|
||||
@@ -65,7 +65,7 @@ trait LoggerTrait
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function error(string|\Stringable $message, array $context = []): void
|
||||
public function error(string|\Stringable $message, array $context = [])
|
||||
{
|
||||
$this->log(LogLevel::ERROR, $message, $context);
|
||||
}
|
||||
@@ -81,7 +81,7 @@ trait LoggerTrait
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function warning(string|\Stringable $message, array $context = []): void
|
||||
public function warning(string|\Stringable $message, array $context = [])
|
||||
{
|
||||
$this->log(LogLevel::WARNING, $message, $context);
|
||||
}
|
||||
@@ -94,7 +94,7 @@ trait LoggerTrait
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function notice(string|\Stringable $message, array $context = []): void
|
||||
public function notice(string|\Stringable $message, array $context = [])
|
||||
{
|
||||
$this->log(LogLevel::NOTICE, $message, $context);
|
||||
}
|
||||
@@ -109,7 +109,7 @@ trait LoggerTrait
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function info(string|\Stringable $message, array $context = []): void
|
||||
public function info(string|\Stringable $message, array $context = [])
|
||||
{
|
||||
$this->log(LogLevel::INFO, $message, $context);
|
||||
}
|
||||
@@ -122,7 +122,7 @@ trait LoggerTrait
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function debug(string|\Stringable $message, array $context = []): void
|
||||
public function debug(string|\Stringable $message, array $context = [])
|
||||
{
|
||||
$this->log(LogLevel::DEBUG, $message, $context);
|
||||
}
|
||||
@@ -138,5 +138,5 @@ trait LoggerTrait
|
||||
*
|
||||
* @throws \Psr\Log\InvalidArgumentException
|
||||
*/
|
||||
abstract public function log($level, string|\Stringable $message, array $context = []): void;
|
||||
abstract public function log($level, string|\Stringable $message, array $context = []);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user