Skip to content

Commit

Permalink
Support psr/log 3.x; drop support for psr/log 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
nocive committed Nov 26, 2024
1 parent 961d1cc commit 89756ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"php": ">=8.1.0",
"ext-curl": "*",
"ext-json": "*",
"psr/log": "^1.0 || ^2.0 || ^3.0"
"psr/log": "^2.0 || ^3.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35"
Expand Down
3 changes: 2 additions & 1 deletion lib/PayPal/Log/PayPalLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use PayPal\Core\PayPalConfigManager;
use Psr\Log\AbstractLogger;
use Psr\Log\LogLevel;
use Stringable;

class PayPalLogger extends AbstractLogger
{
Expand Down Expand Up @@ -72,7 +73,7 @@ public function initialize()
}
}

public function log($level, $message, array $context = array())
public function log($level, Stringable|string $message, array $context = array())
{
if ($this->isLoggingEnabled) {
// Checks if the message is at level below configured logging level
Expand Down

0 comments on commit 89756ca

Please sign in to comment.