Skip to content

Commit

Permalink
Bump PHPStan to 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
xificurk committed Jan 11, 2025
1 parent 2c2e420 commit ebc912b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"require-dev": {
"nette/tester": "2.5.4",
"mockery/mockery": "1.6.12",
"phpstan/phpstan": "1.12.7",
"phpstan/phpstan-strict-rules": "1.6.1",
"phpstan/phpstan-nette": "1.3.8",
"phpstan/phpstan-mockery": "1.1.3",
"nepada/phpstan-nette-tester": "1.2.1",
"spaze/phpstan-disallowed-calls": "4.0.1",
"shipmonk/phpstan-rules": "3.2.1",
"phpstan/phpstan": "2.1.1",
"phpstan/phpstan-strict-rules": "2.0.1",
"phpstan/phpstan-nette": "2.0.1",
"phpstan/phpstan-mockery": "2.0.0",
"nepada/phpstan-nette-tester": "2.0.0",
"spaze/phpstan-disallowed-calls": "v4.1.1",
"shipmonk/phpstan-rules": "4.1.0",
"php-parallel-lint/php-parallel-lint": "1.4.0",
"nepada/coding-standard": "7.14.1",
"nette/di": "^3.0.6@dev",
Expand Down
7 changes: 7 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ parameters:
- Nette\Application\AbortException
- Nette\Application\UI\InvalidLinkException
- Nette\InvalidStateException

ignoreErrors:
- # covered by tests
message: '#^Trait Nepada\\Bridges\\AutocompleteInputForms\\AutocompleteInputMixin is used zero times and is not analysed\.$#'
identifier: trait.unused
count: 1
path: src/Bridges/AutocompleteInputForms/AutocompleteInputMixin.php
4 changes: 2 additions & 2 deletions tests/PHPStan/conditional.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
use Composer\InstalledVersions;
use Composer\Semver\VersionParser;

$config = [];
$config = ['parameters' => ['ignoreErrors' => []]];

if (InstalledVersions::satisfies(new VersionParser(), 'nette/component-model', '<3.1')) {
$config['parameters']['ignoreErrors'][] = [
'message' => '#^Method Nepada\\\\AutocompleteInput\\\\AutocompleteInput\\:\\:getUniqueId\\(\\) should return string but returns string\\|null\\.$#',
'path' => '../../src/AutocompleteInput/AutocompleteInput.php',
'path' => 'src/AutocompleteInput/AutocompleteInput.php',
'count' => 1,
];
}
Expand Down

0 comments on commit ebc912b

Please sign in to comment.