From bafdef95ac19742d98bf761d14de5f1ec293316f Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Sun, 21 Jan 2024 18:48:31 -0500 Subject: [PATCH 1/4] Fix psr/log dependency --- .github/workflows/ci.yml | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c6d3a0..f54a1d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest] - php-versions: ['7.3', '7.4', '8.0', '8.1'] + php-versions: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] steps: - name: Checkout diff --git a/composer.json b/composer.json index 125a570..c8a0a37 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ }, "require": { "php": ">=7.3", - "psr/log": "^1.0" + "psr/log": "^1.0 || ^2.0 || ^3.0" }, "require-dev": { "phpunit/phpunit": "^9.5.10", From e08fd17e8e832176e7a2fd0b32642da063446779 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Sun, 21 Jan 2024 18:50:53 -0500 Subject: [PATCH 2/4] Fix --- src/Plugin/SharedLoggerTrait.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Plugin/SharedLoggerTrait.php b/src/Plugin/SharedLoggerTrait.php index b5cf45b..f6d4060 100644 --- a/src/Plugin/SharedLoggerTrait.php +++ b/src/Plugin/SharedLoggerTrait.php @@ -3,6 +3,7 @@ namespace Vectorface\Auth\Plugin; use Psr\Log\LoggerTrait as PsrLoggerTrait; +use Stringable; use Vectorface\Auth\Auth; /** @@ -29,10 +30,10 @@ trait SharedLoggerTrait * Logs with an arbitrary level, or don't if no logger has been set. * * @param mixed $level The log level. A LogLevel::* constant (usually) - * @param string $message The message to log. + * @param Stringable|string $message The message to log. * @param array $context Further information about the context of the log message. */ - protected function log($level, $message, array $context = []) + protected function log($level, Stringable|string $message, array $context = []) { $logger = null; if (isset($this->logger)) { From 52c55fd45a81f67c70078d982af46a97bb9cf0f6 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Sun, 21 Jan 2024 18:51:52 -0500 Subject: [PATCH 3/4] Bump to 8.0 --- .github/workflows/ci.yml | 2 +- composer.json | 2 +- src/Plugin/SharedLoggerTrait.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f54a1d4..85f53ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest] - php-versions: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] + php-versions: ['8.0', '8.1', '8.2', '8.3'] steps: - name: Checkout diff --git a/composer.json b/composer.json index c8a0a37..a8635b2 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "source": "https://github.com/Vectorface/auth" }, "require": { - "php": ">=7.3", + "php": ">=8.0", "psr/log": "^1.0 || ^2.0 || ^3.0" }, "require-dev": { diff --git a/src/Plugin/SharedLoggerTrait.php b/src/Plugin/SharedLoggerTrait.php index f6d4060..930b778 100644 --- a/src/Plugin/SharedLoggerTrait.php +++ b/src/Plugin/SharedLoggerTrait.php @@ -33,7 +33,7 @@ trait SharedLoggerTrait * @param Stringable|string $message The message to log. * @param array $context Further information about the context of the log message. */ - protected function log($level, Stringable|string $message, array $context = []) + protected function log($level, Stringable|string $message, array $context = []): void { $logger = null; if (isset($this->logger)) { From 0e2cee4b99b8edd1973a7b06bce86986d23c1f40 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Sun, 21 Jan 2024 19:01:02 -0500 Subject: [PATCH 4/4] monolog 2.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a8635b2..3153946 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "require-dev": { "phpunit/phpunit": "^9.5.10", "squizlabs/php_codesniffer": "^3.0", - "monolog/monolog": "^1.0" + "monolog/monolog": "^2.0" }, "scripts": { "test": [