N°5809 Update psr/log from 2.0.0 to 3.0.0

This commit is contained in:
Pierre Goiffon
2024-01-26 15:03:59 +01:00
parent ac44ffcdff
commit 6342e0065a
11 changed files with 54 additions and 54 deletions

View File

@@ -22,7 +22,7 @@
"nikic/php-parser": "^4.14.0",
"pear/archive_tar": "~1.4.14",
"pelago/emogrifier": "^6.0.0",
"psr/log": "^2.0.0",
"psr/log": "^3.0.0",
"scssphp/scssphp": "^1.10.3",
"symfony/console": "~6.4.0",
"symfony/dotenv": "~6.4.0",

16
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "6d27a76ae44c8f09bd214be169536b43",
"content-hash": "1689d9d9deb53606c1d7ec6188662838",
"packages": [
{
"name": "apereo/phpcas",
@@ -1827,16 +1827,16 @@
},
{
"name": "psr/log",
"version": "2.0.0",
"version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "ef29f6d262798707a9edd554e2b82517ef3a9376"
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376",
"reference": "ef29f6d262798707a9edd554e2b82517ef3a9376",
"url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001",
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001",
"shasum": ""
},
"require": {
@@ -1845,7 +1845,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
"dev-master": "3.x-dev"
}
},
"autoload": {
@@ -1871,9 +1871,9 @@
"psr-3"
],
"support": {
"source": "https://github.com/php-fig/log/tree/2.0.0"
"source": "https://github.com/php-fig/log/tree/3.0.0"
},
"time": "2021-07-14T16:41:46+00:00"
"time": "2021-07-14T16:46:02+00:00"
},
{
"name": "ralouphie/getallheaders",

View File

@@ -18,7 +18,7 @@ class CASLogger implements LoggerInterface
CASLog::Enable($sDebugFile);
}
const LEVEL_COMPAT = [
public const LEVEL_COMPAT = [
LogLevel::EMERGENCY => LogAPI::LEVEL_ERROR,
LogLevel::ALERT => LogAPI::LEVEL_ERROR,
LogLevel::CRITICAL => LogAPI::LEVEL_ERROR,
@@ -29,51 +29,51 @@ class CASLogger implements LoggerInterface
LogLevel::DEBUG => LogAPI::LEVEL_DEBUG,
];
public function emergency($message, array $context = array())
public function emergency($message, array $context = array()):void
{
CASLog::Error('EMERGENCY: '.$message, CASLog::CHANNEL_DEFAULT, $context);
IssueLog::Error('EMERGENCY: '.$message, CASLog::CHANNEL_DEFAULT, $context);
}
public function alert($message, array $context = array())
public function alert($message, array $context = array()):void
{
CASLog::Error('ALERT: '.$message, CASLog::CHANNEL_DEFAULT, $context);
IssueLog::Error('ALERT: '.$message, CASLog::CHANNEL_DEFAULT, $context);
}
public function critical($message, array $context = array())
public function critical($message, array $context = array()):void
{
CASLog::Error('CRITICAL: '.$message, CASLog::CHANNEL_DEFAULT, $context);
IssueLog::Error('CRITICAL: '.$message, CASLog::CHANNEL_DEFAULT, $context);
}
public function error($message, array $context = array())
public function error($message, array $context = array()):void
{
CASLog::Error('ERROR: '.$message, CASLog::CHANNEL_DEFAULT, $context);
IssueLog::Error('ERROR: '.$message, CASLog::CHANNEL_DEFAULT, $context);
}
public function warning($message, array $context = array())
public function warning($message, array $context = array()):void
{
CASLog::Warning('WARNING: '.$message, CASLog::CHANNEL_DEFAULT, $context);
}
public function notice($message, array $context = array())
public function notice($message, array $context = array()):void
{
CASLog::Info('NOTICE: '.$message, CASLog::CHANNEL_DEFAULT, $context);
}
public function info($message, array $context = array())
public function info($message, array $context = array()):void
{
CASLog::Info('INFO: '.$message, CASLog::CHANNEL_DEFAULT, $context);
}
public function debug($message, array $context = array())
public function debug($message, array $context = array()):void
{
CASLog::Debug('DEBUG: '.$message, CASLog::CHANNEL_DEFAULT, $context);
}
public function log($level, $message, array $context = array())
public function log($level, $message, array $context = array()):void
{
$sLevel = self::LEVEL_COMPAT[$level] ?? LogAPI::LEVEL_ERROR;
CASLog::Log($sLevel, strtoupper($level).": $message", CASLog::CHANNEL_DEFAULT, $context);

View File

@@ -1902,27 +1902,27 @@
},
{
"name": "psr/log",
"version": "2.0.0",
"version_normalized": "2.0.0.0",
"version": "3.0.0",
"version_normalized": "3.0.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "ef29f6d262798707a9edd554e2b82517ef3a9376"
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376",
"reference": "ef29f6d262798707a9edd554e2b82517ef3a9376",
"url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001",
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001",
"shasum": ""
},
"require": {
"php": ">=8.0.0"
},
"time": "2021-07-14T16:41:46+00:00",
"time": "2021-07-14T16:46:02+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
"dev-master": "3.x-dev"
}
},
"installation-source": "dist",
@@ -1949,7 +1949,7 @@
"psr-3"
],
"support": {
"source": "https://github.com/php-fig/log/tree/2.0.0"
"source": "https://github.com/php-fig/log/tree/3.0.0"
},
"install-path": "../psr/log"
},

View File

@@ -3,7 +3,7 @@
'name' => 'combodo/itop',
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => 'a63e3428edfabdb1d71445a11236a67ef38329c6',
'reference' => '1878aafd4399ad3109742460b5de84883ee87db2',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -22,7 +22,7 @@
'combodo/itop' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => 'a63e3428edfabdb1d71445a11236a67ef38329c6',
'reference' => '1878aafd4399ad3109742460b5de84883ee87db2',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -306,9 +306,9 @@
),
),
'psr/log' => array(
'pretty_version' => '2.0.0',
'version' => '2.0.0.0',
'reference' => 'ef29f6d262798707a9edd554e2b82517ef3a9376',
'pretty_version' => '3.0.0',
'version' => '3.0.0.0',
'reference' => 'fe5ea303b0887d5caefd3d431c3e61ad47037001',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/log',
'aliases' => array(),

View File

@@ -20,7 +20,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
"dev-master": "3.x-dev"
}
}
}

View File

@@ -14,5 +14,5 @@ interface LoggerAwareInterface
*
* @return void
*/
public function setLogger(LoggerInterface $logger);
public function setLogger(LoggerInterface $logger): void;
}

View File

@@ -19,7 +19,7 @@ trait LoggerAwareTrait
*
* @param LoggerInterface $logger
*/
public function setLogger(LoggerInterface $logger)
public function setLogger(LoggerInterface $logger): void
{
$this->logger = $logger;
}

View File

@@ -27,7 +27,7 @@ interface LoggerInterface
*
* @return void
*/
public function emergency(string|\Stringable $message, array $context = []);
public function emergency(string|\Stringable $message, array $context = []): void;
/**
* Action must be taken immediately.
@@ -40,7 +40,7 @@ interface LoggerInterface
*
* @return void
*/
public function alert(string|\Stringable $message, array $context = []);
public function alert(string|\Stringable $message, array $context = []): void;
/**
* Critical conditions.
@@ -52,7 +52,7 @@ interface LoggerInterface
*
* @return void
*/
public function critical(string|\Stringable $message, array $context = []);
public function critical(string|\Stringable $message, array $context = []): void;
/**
* Runtime errors that do not require immediate action but should typically
@@ -63,7 +63,7 @@ interface LoggerInterface
*
* @return void
*/
public function error(string|\Stringable $message, array $context = []);
public function error(string|\Stringable $message, array $context = []): void;
/**
* Exceptional occurrences that are not errors.
@@ -76,7 +76,7 @@ interface LoggerInterface
*
* @return void
*/
public function warning(string|\Stringable $message, array $context = []);
public function warning(string|\Stringable $message, array $context = []): void;
/**
* Normal but significant events.
@@ -86,7 +86,7 @@ interface LoggerInterface
*
* @return void
*/
public function notice(string|\Stringable $message, array $context = []);
public function notice(string|\Stringable $message, array $context = []): void;
/**
* Interesting events.
@@ -98,7 +98,7 @@ interface LoggerInterface
*
* @return void
*/
public function info(string|\Stringable $message, array $context = []);
public function info(string|\Stringable $message, array $context = []): void;
/**
* Detailed debug information.
@@ -108,7 +108,7 @@ interface LoggerInterface
*
* @return void
*/
public function debug(string|\Stringable $message, array $context = []);
public function debug(string|\Stringable $message, array $context = []): void;
/**
* Logs with an arbitrary level.
@@ -121,5 +121,5 @@ interface LoggerInterface
*
* @throws \Psr\Log\InvalidArgumentException
*/
public function log($level, string|\Stringable $message, array $context = []);
public function log($level, string|\Stringable $message, array $context = []): void;
}

View File

@@ -20,7 +20,7 @@ trait LoggerTrait
*
* @return void
*/
public function emergency(string|\Stringable $message, array $context = [])
public function emergency(string|\Stringable $message, array $context = []): void
{
$this->log(LogLevel::EMERGENCY, $message, $context);
}
@@ -36,7 +36,7 @@ trait LoggerTrait
*
* @return void
*/
public function alert(string|\Stringable $message, array $context = [])
public function alert(string|\Stringable $message, array $context = []): void
{
$this->log(LogLevel::ALERT, $message, $context);
}
@@ -51,7 +51,7 @@ trait LoggerTrait
*
* @return void
*/
public function critical(string|\Stringable $message, array $context = [])
public function critical(string|\Stringable $message, array $context = []): void
{
$this->log(LogLevel::CRITICAL, $message, $context);
}
@@ -65,7 +65,7 @@ trait LoggerTrait
*
* @return void
*/
public function error(string|\Stringable $message, array $context = [])
public function error(string|\Stringable $message, array $context = []): void
{
$this->log(LogLevel::ERROR, $message, $context);
}
@@ -81,7 +81,7 @@ trait LoggerTrait
*
* @return void
*/
public function warning(string|\Stringable $message, array $context = [])
public function warning(string|\Stringable $message, array $context = []): void
{
$this->log(LogLevel::WARNING, $message, $context);
}
@@ -94,7 +94,7 @@ trait LoggerTrait
*
* @return void
*/
public function notice(string|\Stringable $message, array $context = [])
public function notice(string|\Stringable $message, array $context = []): void
{
$this->log(LogLevel::NOTICE, $message, $context);
}
@@ -109,7 +109,7 @@ trait LoggerTrait
*
* @return void
*/
public function info(string|\Stringable $message, array $context = [])
public function info(string|\Stringable $message, array $context = []): void
{
$this->log(LogLevel::INFO, $message, $context);
}
@@ -122,7 +122,7 @@ trait LoggerTrait
*
* @return void
*/
public function debug(string|\Stringable $message, array $context = [])
public function debug(string|\Stringable $message, array $context = []): void
{
$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 = []);
abstract public function log($level, string|\Stringable $message, array $context = []): void;
}

View File

@@ -23,7 +23,7 @@ class NullLogger extends AbstractLogger
*
* @throws \Psr\Log\InvalidArgumentException
*/
public function log($level, string|\Stringable $message, array $context = [])
public function log($level, string|\Stringable $message, array $context = []): void
{
// noop
}