From 89756ca6279473078741b04d98288240229bedb7 Mon Sep 17 00:00:00 2001 From: Jose' Pedro Saraiva Date: Tue, 26 Nov 2024 10:58:25 +0100 Subject: [PATCH] Support psr/log 3.x; drop support for psr/log 1.x --- composer.json | 2 +- lib/PayPal/Log/PayPalLogger.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 845fc4a..22c9036 100644 --- a/composer.json +++ b/composer.json @@ -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" diff --git a/lib/PayPal/Log/PayPalLogger.php b/lib/PayPal/Log/PayPalLogger.php index 6be02ec..87dc25a 100644 --- a/lib/PayPal/Log/PayPalLogger.php +++ b/lib/PayPal/Log/PayPalLogger.php @@ -5,6 +5,7 @@ use PayPal\Core\PayPalConfigManager; use Psr\Log\AbstractLogger; use Psr\Log\LogLevel; +use Stringable; class PayPalLogger extends AbstractLogger { @@ -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