diff --git a/CHANGELOG.md b/CHANGELOG.md index ee41ec3..37bc001 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,12 +10,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this ### Changed * Remove predis scan workaround by requiring `symfony/cache` 7.1.7, which fixes it. +* Updated to phpstan 2.0 ### Deprecated * *Nothing* ### Removed -* *Nothing* +* Drop support for `endroid/qr-code` 5.0 ### Fixed * *Nothing* diff --git a/composer.json b/composer.json index e9ce777..c787d9f 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "akrabat/ip-address-middleware": "^2.3", "cakephp/chronos": "^3.1", "doctrine/orm": "^3.2", - "endroid/qr-code": "^6.0 || ^5.0", + "endroid/qr-code": "^6.0", "fig/http-message-util": "^1.1", "guzzlehttp/guzzle": "^7.9", "laminas/laminas-config": "^3.9", @@ -44,8 +44,8 @@ "laminas/laminas-stratigility": "^3.12", "mezzio/mezzio-problem-details": "^1.14", "pagerfanta/core": "^3.8", - "phpstan/phpstan": "^1.11", - "phpstan/phpstan-phpunit": "^1.4", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", "phpunit/phpunit": "^11.3", "psr/simple-cache": "^3.0", "roave/security-advisories": "dev-master", diff --git a/src/Paginator/Paginator.php b/src/Paginator/Paginator.php index 2325885..523b8cb 100644 --- a/src/Paginator/Paginator.php +++ b/src/Paginator/Paginator.php @@ -20,6 +20,7 @@ class Paginator extends Pagerfanta /** * @param positive-int|self::ALL_ITEMS $maxPerPage + * @return Paginator */ public function setMaxPerPage(int $maxPerPage): self { diff --git a/src/Paginator/Util/PagerfantaUtilsTrait.php b/src/Paginator/Util/PagerfantaUtilsTrait.php index 57cbbe3..93bc5b9 100644 --- a/src/Paginator/Util/PagerfantaUtilsTrait.php +++ b/src/Paginator/Util/PagerfantaUtilsTrait.php @@ -9,6 +9,7 @@ /** * @deprecated Use PagerfantaUtils instead + * @phpstan-ignore trait.unused */ trait PagerfantaUtilsTrait { diff --git a/test/Validation/InputFactoryTest.php b/test/Validation/InputFactoryTest.php index b3b2349..4ceeb5a 100644 --- a/test/Validation/InputFactoryTest.php +++ b/test/Validation/InputFactoryTest.php @@ -61,7 +61,6 @@ public function booleanInputIsCreatedAsExpected(array $args, bool $required): vo self::assertContains(Filter\StringTrim::class, $filters); self::assertContains(Filter\Boolean::class, $filters); - /** @var Validator\NotEmpty $notEmptyValidator */ $notEmptyValidator = $validators[0]['instance']; $calculateTypeValue = (fn (array $type) => $this->calculateTypeValue($type))->bindTo( // @phpstan-ignore-line $notEmptyValidator, @@ -90,7 +89,6 @@ public function dateInputIsCreatedAsExpected(array $args, bool $required): void self::assertContains(Filter\StripTags::class, $filters); self::assertContains(Filter\StringTrim::class, $filters); - /** @var ExcludingValidatorChain $excludingValidator */ $excludingValidator = $validators[0]['instance']; self::assertInstanceOf(ExcludingValidatorChain::class, $excludingValidator);