From 8ca0d449280461d57e53c37202ccfe1e411fd614 Mon Sep 17 00:00:00 2001 From: SonataCI Date: Sun, 17 Dec 2023 20:11:39 +0000 Subject: [PATCH 1/2] DevKit updates --- .php-cs-fixer.dist.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 1afe2e23..d197afd5 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -27,8 +27,9 @@ HEADER; $rules = [ - '@PHP74Migration' => true, - '@PHP74Migration:risky' => true, + '@PHP80Migration' => true, + '@PHP80Migration:risky' => true, + '@PHPUnit84Migration:risky' => true, '@PSR12' => true, '@PSR12:risky' => true, '@Symfony' => true, @@ -42,6 +43,7 @@ 'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'], 'no_useless_else' => true, 'no_useless_return' => true, + 'no_superfluous_elseif' => true, 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true, 'remove_inheritdoc' => true], 'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => true], 'ordered_class_elements' => true, @@ -51,16 +53,14 @@ ['phpstan-template', 'phpstan-template-covariant', 'phpstan-extends', 'phpstan-implements', 'phpstan-var', 'psalm-var', 'phpstan-param', 'psalm-param', 'phpstan-return', 'psalm-return'], ['psalm-suppress', 'phpstan-ignore-next-line'], ['Assert\\*'], - ['ODM\\*'], - ['ORM\\*'], ]], - 'php_unit_strict' => true, - 'php_unit_test_case_static_method_calls' => true, 'php_unit_data_provider_name' => true, 'php_unit_data_provider_return_type' => true, + 'php_unit_strict' => true, + 'php_unit_test_case_static_method_calls' => true, 'phpdoc_to_comment' => ['ignored_tags' => ['psalm-suppress', 'phpstan-var']], - 'single_line_throw' => false, 'static_lambda' => true, + 'single_line_throw' => false, 'strict_comparison' => true, 'strict_param' => true, 'void_return' => false, From 4e3735b82e7561d2d682f467fa3d502e89976b84 Mon Sep 17 00:00:00 2001 From: Jordi Sala Morales Date: Mon, 18 Dec 2023 08:33:44 +0100 Subject: [PATCH 2/2] Fix PHPStan --- tests/ClockTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ClockTest.php b/tests/ClockTest.php index 8fb81d50..22cb02e6 100644 --- a/tests/ClockTest.php +++ b/tests/ClockTest.php @@ -47,7 +47,7 @@ public function testFixedClockIsUsed(): void static::assertSame($this->getFixedTime()->format('Y-m-d H:i:s'), $revisions[0]->getTimestamp()->format('Y-m-d H:i:s')); } - protected function getClock(): ?ClockInterface + protected function getClock(): ClockInterface { return new class($this->getFixedTime()) implements ClockInterface { public function __construct(private \DateTimeImmutable $now)