Skip to content

Commit

Permalink
Fix psr/log dependency, bump to PHP 8.0 minimum (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
francislavoie authored Jan 22, 2024
1 parent e1e5c3a commit ca23f65
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ['8.0', '8.1', '8.2', '8.3']

steps:
- name: Checkout
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
"source": "https://github.com/Vectorface/auth"
},
"require": {
"php": ">=7.3",
"psr/log": "^1.0"
"php": ">=8.0",
"psr/log": "^1.0 || ^2.0 || ^3.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5.10",
"squizlabs/php_codesniffer": "^3.0",
"monolog/monolog": "^1.0"
"monolog/monolog": "^2.0"
},
"scripts": {
"test": [
Expand Down
5 changes: 3 additions & 2 deletions src/Plugin/SharedLoggerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Vectorface\Auth\Plugin;

use Psr\Log\LoggerTrait as PsrLoggerTrait;
use Stringable;
use Vectorface\Auth\Auth;

/**
Expand All @@ -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 = []): void
{
$logger = null;
if (isset($this->logger)) {
Expand Down

0 comments on commit ca23f65

Please sign in to comment.