Skip to content

Commit

Permalink
add psr/log 2.0 and 3.0 to 3.x branch (#1006)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemorroj authored Dec 4, 2021
1 parent 68c76ce commit c3c93f0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Logger/ConsoleLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/Logger/DefaultLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -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])) {
Expand Down
2 changes: 1 addition & 1 deletion tests/OpenApiTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c3c93f0

Please sign in to comment.