Skip to content

Commit

Permalink
Support PSR log thru v1 v2 and v3
Browse files Browse the repository at this point in the history
  • Loading branch information
craig410 committed Feb 6, 2024
1 parent a6618ac commit 531e741
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 @@ -7,7 +7,7 @@
"ext-pdo": "*",
"dragonmantank/cron-expression": "^3.3.2",
"ingenerator/php-utils": "^2.0",
"psr/log": "^1.0 || ^2.0",
"psr/log": "^1.0 || ^2.0 || ^3.0",
"symfony/lock": "^5.4 || ^6.0 || ^7.0",
"symfony/process": "^5.4 || ^6.0 || ^7.0"
},
Expand Down
2 changes: 1 addition & 1 deletion test/integration/CronExecutionIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ protected function setUp(): void
$this->output_stream = fopen('php://memory', 'rw');
$this->clock = new RealtimeClock();
$this->logger = new class extends AbstractLogger {
public function log($level, $message, array $context = [])
public function log($level, $message, array $context = []): void
{
echo sprintf('[%s] %s'.PHP_EOL, $level, $message);
}
Expand Down
2 changes: 1 addition & 1 deletion test/integration/working_dir/factory-cronjob-runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
return new DefaultPdoCronjobRunnerFactory(
DbMaintainer::makePdoConnection(),
new class extends AbstractLogger {
public function log($level, $message, array $context = [])
public function log($level, $message, array $context = []): void
{
echo sprintf('[%s] %s'.PHP_EOL, $level, $message);
}
Expand Down
2 changes: 1 addition & 1 deletion test/mock/Logging/SpyingLoggerStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class SpyingLoggerStub extends AbstractLogger
{
protected $logs = [];

public function log($level, $message, array $context = [])
public function log($level, $message, array $context = []): void
{
$this->logs[] = ['level' => $level, 'message' => $message, 'context' => $context];
}
Expand Down

0 comments on commit 531e741

Please sign in to comment.