diff --git a/composer.json b/composer.json index 9b7d46596..b1115fb2f 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "php": ">=7.2", "ext-json": "*", "doctrine/annotations": "^1.7", - "psr/log": "^1.1", + "psr/log": "^1.1 || ^2.0 || ^3.0", "symfony/finder": ">=2.2", "symfony/yaml": ">=3.3" }, diff --git a/src/Logger/ConsoleLogger.php b/src/Logger/ConsoleLogger.php index cc43929b4..aa3a5f7d6 100644 --- a/src/Logger/ConsoleLogger.php +++ b/src/Logger/ConsoleLogger.php @@ -31,7 +31,7 @@ public function called() /** * @param array $context additional details; supports custom `prefix` and `exception` */ - public function log($level, $message, array $context = []) + public function log($level, $message, array $context = []): void { $this->called = true; diff --git a/src/Logger/DefaultLogger.php b/src/Logger/DefaultLogger.php index 9700d9267..cb2195af4 100644 --- a/src/Logger/DefaultLogger.php +++ b/src/Logger/DefaultLogger.php @@ -13,7 +13,7 @@ class DefaultLogger extends AbstractLogger implements LoggerInterface { - public function log($level, $message, array $context = []) + public function log($level, $message, array $context = []): void { // BC: delegate to the static instance if (in_array($level, [LogLevel::NOTICE, LogLevel::INFO, LogLevel::DEBUG])) { diff --git a/tests/OpenApiTestCase.php b/tests/OpenApiTestCase.php index d7bc316ab..e1cbed472 100644 --- a/tests/OpenApiTestCase.php +++ b/tests/OpenApiTestCase.php @@ -60,7 +60,7 @@ public function __construct($testCase) $this->testCase = $testCase; } - public function log($level, $message, array $context = []) + public function log($level, $message, array $context = []): void { if (count($this->testCase->expectedLogMessages)) { list($assertion, $needle) = array_shift($this->testCase->expectedLogMessages);