Skip to content

Commit

Permalink
Fixes phpstan issue caused by monolog upgrade and upgrades psalm. Upd…
Browse files Browse the repository at this point in the history
…ates minimum stability, but this only affects psalm as dev requirement
  • Loading branch information
Sjustein committed Jan 6, 2025
1 parent d67aef0 commit 39a9c10
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"email": "lc@leocavalcante.com"
}
],
"minimum-stability": "stable",
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=8.2",
"monolog/monolog": "^3.0"
Expand All @@ -32,7 +33,7 @@
"friendsofphp/php-cs-fixer": "^3.16",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-deprecation-rules": "^1.1",
"vimeo/psalm": "^5.23",
"vimeo/psalm": "^6.x-dev",
"infection/infection": "^0.27.11"
},
"autoload-dev": {
Expand Down
20 changes: 11 additions & 9 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace HashSensitiveTests;

use Monolog\DateTimeImmutable;
use Monolog\JsonSerializableDateTimeImmutable;
use Monolog\Level;
use Monolog\Logger;
use Monolog\LogRecord;
Expand Down Expand Up @@ -48,7 +49,7 @@ public function __construct(string $name)
* @param array<array-key, mixed> $extra
* @return LogRecord
*/
protected function getRecord(string|int|Level $level = Level::Warning, string|Stringable $message = 'test', array $context = [], string $channel = 'test', \DateTimeImmutable $datetime = new DateTimeImmutable(true), array $extra = []): LogRecord
protected function getRecord(string|int|Level $level = Level::Warning, string|Stringable $message = 'test', array $context = [], string $channel = 'test', \DateTimeImmutable $datetime = new JsonSerializableDateTimeImmutable(true), array $extra = []): LogRecord
{
return new LogRecord(
datetime: $datetime,
Expand Down

0 comments on commit 39a9c10

Please sign in to comment.