Skip to content

Commit

Permalink
Enhancement: Add support for phpstan/phpstan:^2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Jan 7, 2025
1 parent 9999fb1 commit b21663a
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 40 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ For a full diff see [`2.5.1...main`][2.5.1...main].

For a full diff see [`2.5.0...2.5.1`][2.5.0...2.5.1].

### Added

- Added support for `phpstan/phpstan:^2.0.0` ([#873]), by [@localheinz]

### Fixed

- Returned rule with error identifier ([#882]), by [@localheinz]
Expand Down Expand Up @@ -557,6 +561,7 @@ For a full diff see [`362c7ea...0.1.0`][362c7ea...0.1.0].
[#862]: https://github.com/ergebnis/phpstan-rules/pull/862
[#863]: https://github.com/ergebnis/phpstan-rules/pull/863
[#872]: https://github.com/ergebnis/phpstan-rules/pull/872
[#873]: https://github.com/ergebnis/phpstan-rules/pull/873
[#875]: https://github.com/ergebnis/phpstan-rules/pull/875
[#877]: https://github.com/ergebnis/phpstan-rules/pull/877
[#878]: https://github.com/ergebnis/phpstan-rules/pull/878
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"require": {
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
"ext-mbstring": "*",
"phpstan/phpstan": "^1.10.21"
"phpstan/phpstan": "^2.0.0"
},
"require-dev": {
"doctrine/orm": "^2.20.0 || ^3.3.0",
Expand All @@ -34,8 +34,8 @@
"nette/di": "^3.1.10",
"nikic/php-parser": "^4.19.4",
"phpstan/extension-installer": "^1.4.3",
"phpstan/phpstan-deprecation-rules": "^1.2.1",
"phpstan/phpstan-strict-rules": "^1.6.1",
"phpstan/phpstan-deprecation-rules": "^2.0.1",
"phpstan/phpstan-strict-rules": "^2.0.1",
"phpunit/phpunit": "^9.6.21",
"psr/container": "^2.0.2",
"symfony/finder": "^5.4.45",
Expand Down
57 changes: 28 additions & 29 deletions composer.lock

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

30 changes: 22 additions & 8 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,42 +1,56 @@
parameters:
ignoreErrors:
-
message: "#^Language construct isset\\(\\) should not be used\\.$#"
message: '#^Language construct isset\(\) should not be used\.$#'
identifier: ergebnis.noIsset
count: 1
path: src/Classes/FinalRule.php

-
message: "#^Language construct isset\\(\\) should not be used\\.$#"
message: '#^Language construct isset\(\) should not be used\.$#'
identifier: ergebnis.noIsset
count: 1
path: src/Classes/NoExtendsRule.php

-
message: "#^Language construct isset\\(\\) should not be used\\.$#"
message: '#^Language construct isset\(\) should not be used\.$#'
identifier: ergebnis.noIsset
count: 1
path: src/Classes/PHPUnit/Framework/TestCaseWithSuffixRule.php

-
message: "#^Language construct isset\\(\\) should not be used\\.$#"
message: '#^Language construct isset\(\) should not be used\.$#'
identifier: ergebnis.noIsset
count: 1
path: src/Functions/NoNullableReturnTypeDeclarationRule.php

-
message: "#^Class PHPUnit\\\\Framework\\\\Attributes\\\\After not found\\.$#"
message: '#^Method Ergebnis\\PHPStan\\Rules\\Methods\\NoParameterWithContainerTypeDeclarationRule\:\:processNode\(\) should return list\<PHPStan\\Rules\\IdentifierRuleError\> but returns list\.$#'
identifier: return.type
count: 1
path: src/Methods/NoParameterWithContainerTypeDeclarationRule.php

-
message: '#^Class PHPUnit\\Framework\\Attributes\\After not found\.$#'
identifier: class.notFound
count: 1
path: src/Methods/PrivateInFinalClassRule.php

-
message: "#^Class PHPUnit\\\\Framework\\\\Attributes\\\\Before not found\\.$#"
message: '#^Class PHPUnit\\Framework\\Attributes\\Before not found\.$#'
identifier: class.notFound
count: 1
path: src/Methods/PrivateInFinalClassRule.php

-
message: "#^Class PHPUnit\\\\Framework\\\\Attributes\\\\PostCondition not found\\.$#"
message: '#^Class PHPUnit\\Framework\\Attributes\\PostCondition not found\.$#'
identifier: class.notFound
count: 1
path: src/Methods/PrivateInFinalClassRule.php

-
message: "#^Class PHPUnit\\\\Framework\\\\Attributes\\\\PreCondition not found\\.$#"
message: '#^Class PHPUnit\\Framework\\Attributes\\PreCondition not found\.$#'
identifier: class.notFound
count: 1
path: src/Methods/PrivateInFinalClassRule.php

0 comments on commit b21663a

Please sign in to comment.