Skip to content

Commit

Permalink
Merge pull request #159 from acelaya-forks/feature/phpstan-2
Browse files Browse the repository at this point in the history
Update to PHPStan 2.0
  • Loading branch information
acelaya authored Nov 12, 2024
2 parents 08980a8 + cdfd84e commit 3f9b3f4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/Paginator/Paginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class Paginator extends Pagerfanta

/**
* @param positive-int|self::ALL_ITEMS $maxPerPage
* @return Paginator<T>
*/
public function setMaxPerPage(int $maxPerPage): self
{
Expand Down
1 change: 1 addition & 0 deletions src/Paginator/Util/PagerfantaUtilsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

/**
* @deprecated Use PagerfantaUtils instead
* @phpstan-ignore trait.unused
*/
trait PagerfantaUtilsTrait
{
Expand Down
2 changes: 0 additions & 2 deletions test/Validation/InputFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 3f9b3f4

Please sign in to comment.