Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump phpstan packages #225

Merged
merged 3 commits into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-webmozart-assert": "^1.2",
"phpunit/phpunit": "^10.3",
"rector/phpstan-rules": "^0.7.4",
"rector/rector-generator": "^0.7.3",
"phpunit/phpunit": "^10.5",
"rector/rector-src": "dev-main",
"rector/type-perfect": "^0.1.6",
"symplify/easy-coding-standard": "^12.0",
"symplify/phpstan-extensions": "^11.3",
"symplify/phpstan-rules": "^12.4",
"symplify/phpstan-rules": "^13.0",
"symplify/rule-doc-generator": "^12.0",
"symplify/vendor-patches": "^11.2",
"tomasvotruba/class-leak": "^0.2.13",
Expand Down
29 changes: 8 additions & 21 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
includes:
- vendor/symplify/phpstan-rules/config/symplify-rules.neon
- vendor/symplify/phpstan-rules/config/rector-rules.neon

parameters:
level: 8
Expand All @@ -22,6 +23,13 @@ parameters:
- '*/Fixture/*'
- '*/Source/*'

# see https://github.com/rectorphp/type-perfect/
type_perfect:
no_mixed: true
null_over_false: true
narrow_param: true
narrow_return: true

ignoreErrors:
# php enum value minus
- '#Parameter \#1 \$phpVersion of method Rector\\Config\\RectorConfig\:\:phpVersion\(\) expects (.*?), (.*?) given#'
Expand All @@ -31,27 +39,6 @@ parameters:

- '#Calling PHPStan\\Reflection\\Native\\NativeFunctionReflection\:\:getName\(\) is not covered by backward compatibility promise\. The method might change in a minor PHPStan version#'

-
message: '#New objects with "\$functionLikeReflection" name are overridden\. This can lead to unwanted bugs, please pick a different name to avoid it#'
path: rules/DowngradePhp80/NodeAnalyzer/UnnamedArgumentResolver.php

# nullable correction type
-
message: '#New objects with "\$parentReturnTypeNode" name are overridden\. This can lead to unwanted bugs, please pick a different name to avoid it#'
path: rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php

# cleaning expr
-
message: '#New objects with "\$bitwiseOr" name are overridden\. This can lead to unwanted bugs, please pick a different name to avoid it#'
path: rules/DowngradePhp72/NodeManipulator/BitwiseFlagCleaner.php

- '#Method "decorateReturnWithSpecificType\(\)" returns bool type, so the name should start with is/has/was#'
- '#Method "decorateParamWithSpecificType\(\)" returns bool type, so the name should start with is/has/was#'

-
message: '#New objects with "\$returnType" name are overridden\. This can lead to unwanted bugs, please pick a different name to avoid it#'
path: src/PhpDocDecorator/PhpDocFromTypeDeclarationDecorator.php

- '#Parameter \#3 \$stmt of method Rector\\DowngradePhp72\\Rector\\FuncCall\\DowngradePregUnmatchedAsNullConstantRector\:\:processReplace\(\) expects PhpParser\\Node\\Stmt, PhpParser\\Node given#'

- '#(.*?)\:\:refactor\(\) should return array<PhpParser\\Node\\Stmt>\|PhpParser\\Node\\Stmt\\ClassConst\|null but returns array<PhpParser\\Node\\Stmt>\|PhpParser\\Node\\Stmt\|null#'
Expand Down
Loading