Skip to content
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"rector/type-perfect": "^2.1.2",
"shipmonk/composer-dependency-analyser": "^1.8",
"symplify/phpstan-extensions": "^12.0.2",
"symplify/phpstan-rules": "^14.9.4",
"symplify/phpstan-rules": "^14.9.11",
"symplify/vendor-patches": "^11.5",
"tomasvotruba/class-leak": "^2.1",
"tomasvotruba/unused-public": "^2.1",
Expand Down
39 changes: 5 additions & 34 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ includes:
parameters:
level: 8

reportUnmatchedIgnoredErrors: false
# reportUnmatchedIgnoredErrors: false

errorFormat: symplify

# see https://phpstan.org/writing-php-code/phpdoc-types#global-type-aliases
Expand Down Expand Up @@ -371,11 +372,6 @@ parameters:

- '#Method Rector\\Utils\\Rector\\RemoveRefactorDuplicatedNodeInstanceCheckRector\:\:getInstanceofNodeClass\(\) should return class\-string<PhpParser\\Node>\|null but returns class\-string#'

# helper classes for bin script
-
path: scripts
identifier: symplify.multipleClassLikeInFile

# copied from /vendor, to keep as original as possible
-
identifier: missingType.iterableValue
Expand Down Expand Up @@ -406,9 +402,6 @@ parameters:
- rules/DeadCode/Rector/ConstFetch/RemovePhpVersionIdCheckRector.php
- rules/DeadCode/Rector/If_/UnwrapFutureCompatibleIfPhpVersionRector.php

# condition check, just to be sure
- '#Method Rector\\Rector\\AbstractRector\:\:enterNode\(\) never returns 3 so it can be removed from the return type#'

# deprecated
-
identifier: public.method.unused
Expand All @@ -417,14 +410,7 @@ parameters:
- rules/CodeQuality/ValueObject/KeyAndExpr.php
-
identifier: symplify.forbiddenExtendOfNonAbstractClass
path: src/PhpParser/Node/FileNode.php
-
identifier: method.deprecatedClass
path: src/PhpParser/Node/FileNode.php

-
identifier: class.extendsDeprecatedClass
path: src/PhpParser/Node/FileNode.php
path: rules/Php81/Rector/Array_/FirstClassCallableRector.php

-
identifier: public.classConstant.unused
Expand All @@ -442,35 +428,20 @@ parameters:
- '#Rule Rector\\Php81\\Rector\\Array_\\FirstClassCallableRector must implements Rector\\VersionBonding\\Contract\\MinPhpVersionInterface#'
- '#Register "Rector\\Php81\\Rector\\Array_\\FirstClassCallableRector" service to "php81\.php" config set#'
- '#Class "Rector\\CodingStyle\\Rector\\String_\\SymplifyQuoteEscapeRector" is missing @see annotation with test case class reference#'
- '#Access to constant on deprecated class Rector\\Php81\\Rector\\Array_\\FirstClassCallableRector#'

# BC layer for FileWithoutNamespace node
- message: '#Use @see \\Rector\\PhpParser\\Node\\FileNode instead#'
- '#BC layer for FileNode and FileWithoutNamespace compat, use FileNode instead#'
-
path: src/PhpParser/Node/CustomNode/FileWithoutNamespace.php
identifier: symplify.forbiddenExtendOfNonAbstractClass
-
message: '#Only abstract classes can be extended#'
path: rules/Php81/Rector/Array_/FirstClassCallableRector.php

- '#Method Rector\\Tests\\Issues\\FileWithoutNamespaceCompat\\Rector\\SubscribedToFileWithoutNamespaceRector\:\:refactor\(\) should return Rector\\PhpParser\\Node\\FileNode but returns Rector\\PhpParser\\Node\\CustomNode\\FileWithoutNamespace#'

# BC layer for FileWithoutNamespace node
- message: '#Use @see \\Rector\\PhpParser\\Node\\FileNode instead#'
- '#Class Rector\\PhpParser\\Node\\CustomNode\\FileWithoutNamespace extends final class Rector\\PhpParser\\Node\\FileNode#'
-
path: src/PhpParser/Node/CustomNode/FileWithoutNamespace.php
identifier: symplify.forbiddenExtendOfNonAbstractClass

# false positive
-
identifier: phpstanApi.varTagAssumption
path: rules/TypeDeclarationDocblocks/Rector/ClassMethod/AddReturnDocblockForDimFetchArrayFromAssignsRector.php

# bug, fix in symplify/phpstan-rules
# @todo fix in phpstan-rules
-
identifier: symplify.noMissnamedDocTag
paths:
- rules/Php74/NodeAnalyzer/ClosureArrowFunctionAnalyzer.php
- rules/TypeDeclarationDocblocks/TypeResolver/ConstantArrayTypeGeneralizer.php
path: rules/TypeDeclarationDocblocks/TypeResolver/ConstantArrayTypeGeneralizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
final class ConstantArrayTypeGeneralizer
{
/**
* @var int
*
* Using 10-level array @return docblocks makes code very hard to read,
* lets limit it to reasonable level
*/
Expand Down