diff --git a/lib/psr/log/readme_moodle.txt b/lib/psr/log/readme_moodle.txt new file mode 100644 index 00000000000..e1b6478e688 --- /dev/null +++ b/lib/psr/log/readme_moodle.txt @@ -0,0 +1,10 @@ +# PSR-3 Log + +This is a description for including the PSR-3 Interfaces in Moodle + +## Installation + +1. Visit https://github.com/php-fig/log +2. Download the latest release +3. Unzip in this folder +4. Update `thirdpartylibs.xml` diff --git a/lib/psr/log/src/LoggerAwareInterface.php b/lib/psr/log/src/LoggerAwareInterface.php index cc46a95147c..062187057d5 100644 --- a/lib/psr/log/src/LoggerAwareInterface.php +++ b/lib/psr/log/src/LoggerAwareInterface.php @@ -9,10 +9,6 @@ interface LoggerAwareInterface { /** * Sets a logger instance on the object. - * - * @param LoggerInterface $logger - * - * @return void */ public function setLogger(LoggerInterface $logger): void; } diff --git a/lib/psr/log/src/LoggerAwareTrait.php b/lib/psr/log/src/LoggerAwareTrait.php index 4fb57a29226..85104dbc19e 100644 --- a/lib/psr/log/src/LoggerAwareTrait.php +++ b/lib/psr/log/src/LoggerAwareTrait.php @@ -9,15 +9,11 @@ trait LoggerAwareTrait { /** * The logger instance. - * - * @var LoggerInterface|null */ protected ?LoggerInterface $logger = null; /** * Sets a logger. - * - * @param LoggerInterface $logger */ public function setLogger(LoggerInterface $logger): void { diff --git a/lib/psr/log/src/LoggerInterface.php b/lib/psr/log/src/LoggerInterface.php index b3a24b5f7e9..cb4cf648b40 100644 --- a/lib/psr/log/src/LoggerInterface.php +++ b/lib/psr/log/src/LoggerInterface.php @@ -22,10 +22,7 @@ interface LoggerInterface /** * System is unusable. * - * @param string|\Stringable $message * @param mixed[] $context - * - * @return void */ public function emergency(string|\Stringable $message, array $context = []): void; @@ -35,10 +32,7 @@ interface LoggerInterface * Example: Entire website down, database unavailable, etc. This should * trigger the SMS alerts and wake you up. * - * @param string|\Stringable $message * @param mixed[] $context - * - * @return void */ public function alert(string|\Stringable $message, array $context = []): void; @@ -47,10 +41,7 @@ interface LoggerInterface * * Example: Application component unavailable, unexpected exception. * - * @param string|\Stringable $message * @param mixed[] $context - * - * @return void */ public function critical(string|\Stringable $message, array $context = []): void; @@ -58,10 +49,7 @@ interface LoggerInterface * Runtime errors that do not require immediate action but should typically * be logged and monitored. * - * @param string|\Stringable $message * @param mixed[] $context - * - * @return void */ public function error(string|\Stringable $message, array $context = []): void; @@ -71,20 +59,14 @@ interface LoggerInterface * Example: Use of deprecated APIs, poor use of an API, undesirable things * that are not necessarily wrong. * - * @param string|\Stringable $message * @param mixed[] $context - * - * @return void */ public function warning(string|\Stringable $message, array $context = []): void; /** * Normal but significant events. * - * @param string|\Stringable $message * @param mixed[] $context - * - * @return void */ public function notice(string|\Stringable $message, array $context = []): void; @@ -93,32 +75,23 @@ interface LoggerInterface * * Example: User logs in, SQL logs. * - * @param string|\Stringable $message * @param mixed[] $context - * - * @return void */ public function info(string|\Stringable $message, array $context = []): void; /** * Detailed debug information. * - * @param string|\Stringable $message * @param mixed[] $context - * - * @return void */ public function debug(string|\Stringable $message, array $context = []): void; /** * Logs with an arbitrary level. * - * @param mixed $level - * @param string|\Stringable $message + * @param mixed $level * @param mixed[] $context * - * @return void - * * @throws \Psr\Log\InvalidArgumentException */ public function log($level, string|\Stringable $message, array $context = []): void; diff --git a/lib/psr/log/src/LoggerTrait.php b/lib/psr/log/src/LoggerTrait.php index 9c8733f957f..a5d9980b6fa 100644 --- a/lib/psr/log/src/LoggerTrait.php +++ b/lib/psr/log/src/LoggerTrait.php @@ -14,11 +14,6 @@ trait LoggerTrait { /** * System is unusable. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void */ public function emergency(string|\Stringable $message, array $context = []): void { @@ -30,11 +25,6 @@ trait LoggerTrait * * Example: Entire website down, database unavailable, etc. This should * trigger the SMS alerts and wake you up. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void */ public function alert(string|\Stringable $message, array $context = []): void { @@ -45,11 +35,6 @@ trait LoggerTrait * Critical conditions. * * Example: Application component unavailable, unexpected exception. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void */ public function critical(string|\Stringable $message, array $context = []): void { @@ -59,11 +44,6 @@ trait LoggerTrait /** * Runtime errors that do not require immediate action but should typically * be logged and monitored. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void */ public function error(string|\Stringable $message, array $context = []): void { @@ -75,11 +55,6 @@ trait LoggerTrait * * Example: Use of deprecated APIs, poor use of an API, undesirable things * that are not necessarily wrong. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void */ public function warning(string|\Stringable $message, array $context = []): void { @@ -88,11 +63,6 @@ trait LoggerTrait /** * Normal but significant events. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void */ public function notice(string|\Stringable $message, array $context = []): void { @@ -103,11 +73,6 @@ trait LoggerTrait * Interesting events. * * Example: User logs in, SQL logs. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void */ public function info(string|\Stringable $message, array $context = []): void { @@ -116,11 +81,6 @@ trait LoggerTrait /** * Detailed debug information. - * - * @param string|\Stringable $message - * @param array $context - * - * @return void */ public function debug(string|\Stringable $message, array $context = []): void { @@ -130,11 +90,7 @@ trait LoggerTrait /** * Logs with an arbitrary level. * - * @param mixed $level - * @param string|\Stringable $message - * @param array $context - * - * @return void + * @param mixed $level * * @throws \Psr\Log\InvalidArgumentException */ diff --git a/lib/psr/log/src/NullLogger.php b/lib/psr/log/src/NullLogger.php index c1cc3c0692a..de0561e2ae9 100644 --- a/lib/psr/log/src/NullLogger.php +++ b/lib/psr/log/src/NullLogger.php @@ -15,11 +15,7 @@ class NullLogger extends AbstractLogger /** * Logs with an arbitrary level. * - * @param mixed $level - * @param string|\Stringable $message - * @param array $context - * - * @return void + * @param mixed[] $context * * @throws \Psr\Log\InvalidArgumentException */ diff --git a/lib/thirdpartylibs.xml b/lib/thirdpartylibs.xml index a1dd9781934..fac4ef056cc 100644 --- a/lib/thirdpartylibs.xml +++ b/lib/thirdpartylibs.xml @@ -672,7 +672,7 @@ All rights reserved. psr/log log Common interface for logging libraries - 3.0.0 + 3.0.2 MIT https://github.com/php-fig/log