From 8979f5a78fb80c29765d368c4c6389cd5a892bc6 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Tue, 6 Oct 2026 10:41:19 +0200 Subject: [PATCH 1/2] Replace tomasvotruba/unused-public with shipmonk/dead-code-detector --- composer.json | 2 +- phpstan-baseline.neon | 529 ++++++++++++++++++++++++++++++++++++++++++ phpstan.neon | 6 + 3 files changed, 536 insertions(+), 1 deletion(-) create mode 100644 phpstan-baseline.neon diff --git a/composer.json b/composer.json index 97be7266..bcd0f6de 100644 --- a/composer.json +++ b/composer.json @@ -15,13 +15,13 @@ "rector/jack": "^1.0", "rector/rector-src": "dev-main", "rector/swiss-knife": "^2.4", + "shipmonk/dead-code-detector": "^1.4", "symplify/easy-coding-standard": "^13.2", "symplify/phpstan-extensions": "^12.0", "symplify/phpstan-rules": "^14.13.1", "symplify/rule-doc-generator": "^12.2", "tomasvotruba/class-leak": "^2.1", "tomasvotruba/type-coverage": "^2.3", - "tomasvotruba/unused-public": "^2.2", "tracy/tracy": "^2.12" }, "autoload": { diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 00000000..5dc1d4a5 --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,529 @@ +parameters: + ignoreErrors: + - + message: '#^Unused Rector\\DowngradePhp72\\NodeAnalyzer\\BuiltInMethodAnalyzer\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp72/NodeAnalyzer/BuiltInMethodAnalyzer.php + + - + message: '#^Unused Rector\\DowngradePhp72\\NodeAnalyzer\\OverrideFromAnonymousClassMethodAnalyzer\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp72/NodeAnalyzer/OverrideFromAnonymousClassMethodAnalyzer.php + + - + message: '#^Unused Rector\\DowngradePhp72\\NodeAnalyzer\\RegexFuncAnalyzer\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp72/NodeAnalyzer/RegexFuncAnalyzer.php + + - + message: '#^Unused Rector\\DowngradePhp72\\NodeManipulator\\BitwiseFlagCleaner\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp72/NodeManipulator/BitwiseFlagCleaner.php + + - + message: '#^Unused Rector\\DowngradePhp72\\NodeManipulator\\JsonConstCleaner\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp72/NodeManipulator/JsonConstCleaner.php + + - + message: '#^Unused Rector\\DowngradePhp72\\PhpDoc\\NativeParamToPhpDocDecorator\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp72/PhpDoc/NativeParamToPhpDocDecorator.php + + - + message: '#^Unused Rector\\DowngradePhp72\\Rector\\ClassMethod\\DowngradeParameterTypeWideningRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php + + - + message: '#^Unused Rector\\DowngradePhp72\\Rector\\ConstFetch\\DowngradePhp72JsonConstRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp72/Rector/ConstFetch/DowngradePhp72JsonConstRector.php + + - + message: '#^Unused Rector\\DowngradePhp72\\Rector\\FuncCall\\DowngradeJsonDecodeNullAssociativeArgRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp72/Rector/FuncCall/DowngradeJsonDecodeNullAssociativeArgRector.php + + - + message: '#^Unused Rector\\DowngradePhp72\\Rector\\FuncCall\\DowngradePregUnmatchedAsNullConstantRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php + + - + message: '#^Unused Rector\\DowngradePhp72\\Rector\\FuncCall\\DowngradeStreamIsattyRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp72/Rector/FuncCall/DowngradeStreamIsattyRector.php + + - + message: '#^Unused Rector\\DowngradePhp72\\Rector\\FunctionLike\\DowngradeObjectTypeDeclarationRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php + + - + message: '#^Unused Rector\\DowngradePhp73\\Rector\\ConstFetch\\DowngradePhp73JsonConstRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp73/Rector/ConstFetch/DowngradePhp73JsonConstRector.php + + - + message: '#^Unused Rector\\DowngradePhp73\\Rector\\FuncCall\\DowngradeArrayKeyFirstLastRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php + + - + message: '#^Unused Rector\\DowngradePhp73\\Rector\\FuncCall\\DowngradeTrailingCommasInFunctionCallsRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php + + - + message: '#^Unused Rector\\DowngradePhp73\\Rector\\String_\\DowngradeFlexibleHeredocSyntaxRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp73/Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php + + - + message: '#^Unused Rector\\DowngradePhp73\\Rector\\Unset_\\DowngradeTrailingCommasInUnsetRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp73/Rector/Unset_/DowngradeTrailingCommasInUnsetRector.php + + - + message: '#^Unused Rector\\DowngradePhp74\\Rector\\Array_\\DowngradeArraySpreadRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php + + - + message: '#^Unused Rector\\DowngradePhp74\\Rector\\ArrowFunction\\ArrowFunctionToAnonymousFunctionRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp74/Rector/ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php + + - + message: '#^Unused Rector\\DowngradePhp74\\Rector\\ClassMethod\\DowngradeContravariantArgumentTypeRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php + + - + message: '#^Unused Rector\\DowngradePhp74\\Rector\\ClassMethod\\DowngradeCovariantReturnTypeRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php + + - + message: '#^Unused Rector\\DowngradePhp74\\Rector\\FuncCall\\DowngradeStripTagsCallWithArrayRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php + + - + message: '#^Unused Rector\\DowngradePhp74\\Rector\\Identical\\DowngradeFreadFwriteFalsyToNegationRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp74/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php + + - + message: '#^Unused Rector\\DowngradePhp74\\Rector\\Interface_\\DowngradePreviouslyImplementedInterfaceRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp74/Rector/Interface_/DowngradePreviouslyImplementedInterfaceRector.php + + - + message: '#^Unused Rector\\DowngradePhp74\\Rector\\Property\\DowngradeTypedPropertyRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\NodeAnalyzer\\EnumAnalyzer\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/NodeAnalyzer/EnumAnalyzer.php + + - + message: '#^Unused Rector\\DowngradePhp80\\NodeAnalyzer\\NamedToUnnamedArgs\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/NodeAnalyzer/NamedToUnnamedArgs.php + + - + message: '#^Unused Rector\\DowngradePhp80\\NodeAnalyzer\\UnnamedArgumentResolver\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/NodeAnalyzer/UnnamedArgumentResolver.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\Catch_\\DowngradeNonCapturingCatchesRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/Catch_/DowngradeNonCapturingCatchesRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\ClassMethod\\DowngradeAbstractPrivateMethodInTraitRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/ClassMethod/DowngradeAbstractPrivateMethodInTraitRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\ClassMethod\\DowngradeRecursiveDirectoryIteratorHasChildrenRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\ClassMethod\\DowngradeStaticTypeDeclarationRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\ClassMethod\\DowngradeStringReturnTypeOnToStringRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/ClassMethod/DowngradeStringReturnTypeOnToStringRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\ClassMethod\\DowngradeTrailingCommasInParamUseRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\Class_\\DowngradeAttributeToAnnotationRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/Class_/DowngradeAttributeToAnnotationRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\Class_\\DowngradePropertyPromotionRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\Enum_\\DowngradeEnumToConstantListClassRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/Enum_/DowngradeEnumToConstantListClassRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\Expression\\DowngradeMatchToSwitchRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\Expression\\DowngradeThrowExprRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\FuncCall\\DowngradeArrayFilterNullableCallbackRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/FuncCall/DowngradeArrayFilterNullableCallbackRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\FuncCall\\DowngradeNumberFormatNoFourthArgRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/FuncCall/DowngradeNumberFormatNoFourthArgRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\FuncCall\\DowngradeSubstrFalsyRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/FuncCall/DowngradeSubstrFalsyRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\FunctionLike\\DowngradeMixedTypeDeclarationRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\FunctionLike\\DowngradeUnionTypeDeclarationRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\Instanceof_\\DowngradePhp80ResourceReturnToObjectRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\MethodCall\\DowngradeNamedArgumentRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\MethodCall\\DowngradeReflectionClassGetConstantsFilterRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\New_\\DowngradeArbitraryExpressionsSupportRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\Property\\DowngradeMixedTypeTypedPropertyRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/Property/DowngradeMixedTypeTypedPropertyRector.php + + - + message: '#^Unused Rector\\DowngradePhp80\\Rector\\Property\\DowngradeUnionTypeTypedPropertyRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector.php + + - + message: '#^Unused Rector\\DowngradePhp81\\NodeFactory\\ArrayMergeFromArraySpreadFactory\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp81/NodeFactory/ArrayMergeFromArraySpreadFactory.php + + - + message: '#^Unused Rector\\DowngradePhp81\\NodeManipulator\\ObjectToResourceReturn\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp81/NodeManipulator/ObjectToResourceReturn.php + + - + message: '#^Unused Rector\\DowngradePhp81\\Rector\\ClassConst\\DowngradeFinalizePublicClassConstantRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp81/Rector/ClassConst/DowngradeFinalizePublicClassConstantRector.php + + - + message: '#^Unused Rector\\DowngradePhp81\\Rector\\ClassMethod\\AddReturnTypeWillChangeAttributeRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp81/Rector/ClassMethod/AddReturnTypeWillChangeAttributeRector.php + + - + message: '#^Unused Rector\\DowngradePhp81\\Rector\\FuncCall\\DowngradeArrayIsListRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp81/Rector/FuncCall/DowngradeArrayIsListRector.php + + - + message: '#^Unused Rector\\DowngradePhp81\\Rector\\FuncCall\\DowngradeHashAlgorithmXxHashRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php + + - + message: '#^Unused Rector\\DowngradePhp81\\Rector\\FunctionLike\\DowngradeNeverTypeDeclarationRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp81/Rector/FunctionLike/DowngradeNeverTypeDeclarationRector.php + + - + message: '#^Unused Rector\\DowngradePhp81\\Rector\\FunctionLike\\DowngradeNewInInitializerRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php + + - + message: '#^Unused Rector\\DowngradePhp81\\Rector\\FunctionLike\\DowngradePureIntersectionTypeRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp81/Rector/FunctionLike/DowngradePureIntersectionTypeRector.php + + - + message: '#^Unused Rector\\DowngradePhp81\\Rector\\Instanceof_\\DowngradePhp81ResourceReturnToObjectRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp81/Rector/Instanceof_/DowngradePhp81ResourceReturnToObjectRector.php + + - + message: '#^Unused Rector\\DowngradePhp81\\Rector\\Property\\DowngradeReadonlyPropertyRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp81/Rector/Property/DowngradeReadonlyPropertyRector.php + + - + message: '#^Unused Rector\\DowngradePhp81\\Rector\\StmtsAwareInterface\\DowngradeSetAccessibleReflectionPropertyRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp81/Rector/StmtsAwareInterface/DowngradeSetAccessibleReflectionPropertyRector.php + + - + message: '#^Unused Rector\\DowngradePhp82\\NodeManipulator\\DowngradeReadonlyClassManipulator\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp82/NodeManipulator/DowngradeReadonlyClassManipulator.php + + - + message: '#^Unused Rector\\DowngradePhp82\\Rector\\ArrowFunction\\DowngradeArrowFunctionNeverReturnTypeRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp82/Rector/ArrowFunction/DowngradeArrowFunctionNeverReturnTypeRector.php + + - + message: '#^Unused Rector\\DowngradePhp82\\Rector\\Class_\\DowngradeReadonlyClassRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp82/Rector/Class_/DowngradeReadonlyClassRector.php + + - + message: '#^Unused Rector\\DowngradePhp82\\Rector\\Class_\\DowngradeUnionIntersectionRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp82/Rector/Class_/DowngradeUnionIntersectionRector.php + + - + message: '#^Unused Rector\\DowngradePhp82\\Rector\\FuncCall\\DowngradeIteratorCountToArrayRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp82/Rector/FuncCall/DowngradeIteratorCountToArrayRector.php + + - + message: '#^Unused Rector\\DowngradePhp82\\Rector\\FunctionLike\\DowngradeStandaloneNullTrueFalseReturnTypeRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp82/Rector/FunctionLike/DowngradeStandaloneNullTrueFalseReturnTypeRector.php + + - + message: '#^Unused Rector\\DowngradePhp82\\Rector\\MethodCall\\DowngradeReflectionMethodHasPrototypeRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp82/Rector/MethodCall/DowngradeReflectionMethodHasPrototypeRector.php + + - + message: '#^Unused Rector\\DowngradePhp83\\Rector\\ClassConst\\DowngradeTypedClassConstRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp83/Rector/ClassConst/DowngradeTypedClassConstRector.php + + - + message: '#^Unused Rector\\DowngradePhp83\\Rector\\Class_\\DowngradeReadonlyAnonymousClassRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp83/Rector/Class_/DowngradeReadonlyAnonymousClassRector.php + + - + message: '#^Unused Rector\\DowngradePhp83\\Rector\\FuncCall\\DowngradeJsonValidateRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp83/Rector/FuncCall/DowngradeJsonValidateRector.php + + - + message: '#^Unused Rector\\DowngradePhp84\\Rector\\ClassMethod\\DowngradeDeprecatedAttributeRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp84/Rector/ClassMethod/DowngradeDeprecatedAttributeRector.php + + - + message: '#^Unused Rector\\DowngradePhp84\\Rector\\Class_\\DowngradeFinalPropertyRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp84/Rector/Class_/DowngradeFinalPropertyRector.php + + - + message: '#^Unused Rector\\DowngradePhp84\\Rector\\Expression\\DowngradeArrayAllRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp84/Rector/Expression/DowngradeArrayAllRector.php + + - + message: '#^Unused Rector\\DowngradePhp84\\Rector\\Expression\\DowngradeArrayAnyRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp84/Rector/Expression/DowngradeArrayAnyRector.php + + - + message: '#^Unused Rector\\DowngradePhp84\\Rector\\Expression\\DowngradeArrayFindKeyRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindKeyRector.php + + - + message: '#^Unused Rector\\DowngradePhp84\\Rector\\Expression\\DowngradeArrayFindRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindRector.php + + - + message: '#^Unused Rector\\DowngradePhp85\\Rector\\Class_\\DowngradeFinalPropertyPromotionRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php + + - + message: '#^Unused Rector\\DowngradePhp85\\Rector\\Expression\\DowngradeVoidCastRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp85/Rector/Expression/DowngradeVoidCastRector.php + + - + message: '#^Unused Rector\\DowngradePhp85\\Rector\\StmtsAwareInterface\\DowngradePipeOperatorRector\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: rules/DowngradePhp85/Rector/StmtsAwareInterface/DowngradePipeOperatorRector.php + + - + message: '#^Unused Rector\\NodeAnalyzer\\DefineFuncCallAnalyzer\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: src/NodeAnalyzer/DefineFuncCallAnalyzer.php + + - + message: '#^Unused Rector\\NodeAnalyzer\\ExprInTopStmtMatcher\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: src/NodeAnalyzer/ExprInTopStmtMatcher.php + + - + message: '#^Unused Rector\\NodeFactory\\ClassFromEnumFactory\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: src/NodeFactory/ClassFromEnumFactory.php + + - + message: '#^Unused Rector\\NodeFactory\\DoctrineAnnotationFactory\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: src/NodeFactory/DoctrineAnnotationFactory.php + + - + message: '#^Unused Rector\\NodeFactory\\NamedVariableFactory\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: src/NodeFactory/NamedVariableFactory.php + + - + message: '#^Unused Rector\\NodeManipulator\\PropertyDecorator\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: src/NodeManipulator/PropertyDecorator.php + + - + message: '#^Unused Rector\\PhpDocDecorator\\PhpDocFromTypeDeclarationDecorator\:\:__construct$#' + identifier: shipmonk.deadMethod + count: 1 + path: src/PhpDocDecorator/PhpDocFromTypeDeclarationDecorator.php diff --git a/phpstan.neon b/phpstan.neon index ab151e7c..0689c3f0 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,4 +1,5 @@ includes: + - phpstan-baseline.neon - vendor/symplify/phpstan-rules/config/rector-rules.neon parameters: @@ -7,6 +8,11 @@ parameters: errorFormat: symplify reportUnmatchedIgnoredErrors: false + # avoids flaky DCD cache miss on fresh runs + shipmonkDeadCode: + cache: + offloadCollectorData: false + # see https://phpstan.org/writing-php-code/phpdoc-types#global-type-aliases typeAliases: StmtsAware: \PhpParser\Node\Stmt\Block | \PhpParser\Node\Expr\Closure | \PhpParser\Node\Stmt\Case_ | \PhpParser\Node\Stmt\Catch_ | \PhpParser\Node\Stmt\ClassMethod | \PhpParser\Node\Stmt\Do_ | \PhpParser\Node\Stmt\Else_ | \PhpParser\Node\Stmt\ElseIf_ | \PhpParser\Node\Stmt\Finally_ | \PhpParser\Node\Stmt\For_ | \PhpParser\Node\Stmt\Foreach_ | \PhpParser\Node\Stmt\Function_ | \PhpParser\Node\Stmt\If_ | \PhpParser\Node\Stmt\Namespace_ | \PhpParser\Node\Stmt\TryCatch | \PhpParser\Node\Stmt\While_ From 8b52eb16ed0dd3a206dd8999184d477629801aac Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Tue, 6 Oct 2026 11:11:27 +0200 Subject: [PATCH 2/2] Ignore DI constructors via single mask instead of baseline --- phpstan-baseline.neon | 529 ------------------------------------------ phpstan.neon | 6 +- 2 files changed, 5 insertions(+), 530 deletions(-) delete mode 100644 phpstan-baseline.neon diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon deleted file mode 100644 index 5dc1d4a5..00000000 --- a/phpstan-baseline.neon +++ /dev/null @@ -1,529 +0,0 @@ -parameters: - ignoreErrors: - - - message: '#^Unused Rector\\DowngradePhp72\\NodeAnalyzer\\BuiltInMethodAnalyzer\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp72/NodeAnalyzer/BuiltInMethodAnalyzer.php - - - - message: '#^Unused Rector\\DowngradePhp72\\NodeAnalyzer\\OverrideFromAnonymousClassMethodAnalyzer\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp72/NodeAnalyzer/OverrideFromAnonymousClassMethodAnalyzer.php - - - - message: '#^Unused Rector\\DowngradePhp72\\NodeAnalyzer\\RegexFuncAnalyzer\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp72/NodeAnalyzer/RegexFuncAnalyzer.php - - - - message: '#^Unused Rector\\DowngradePhp72\\NodeManipulator\\BitwiseFlagCleaner\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp72/NodeManipulator/BitwiseFlagCleaner.php - - - - message: '#^Unused Rector\\DowngradePhp72\\NodeManipulator\\JsonConstCleaner\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp72/NodeManipulator/JsonConstCleaner.php - - - - message: '#^Unused Rector\\DowngradePhp72\\PhpDoc\\NativeParamToPhpDocDecorator\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp72/PhpDoc/NativeParamToPhpDocDecorator.php - - - - message: '#^Unused Rector\\DowngradePhp72\\Rector\\ClassMethod\\DowngradeParameterTypeWideningRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php - - - - message: '#^Unused Rector\\DowngradePhp72\\Rector\\ConstFetch\\DowngradePhp72JsonConstRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp72/Rector/ConstFetch/DowngradePhp72JsonConstRector.php - - - - message: '#^Unused Rector\\DowngradePhp72\\Rector\\FuncCall\\DowngradeJsonDecodeNullAssociativeArgRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp72/Rector/FuncCall/DowngradeJsonDecodeNullAssociativeArgRector.php - - - - message: '#^Unused Rector\\DowngradePhp72\\Rector\\FuncCall\\DowngradePregUnmatchedAsNullConstantRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php - - - - message: '#^Unused Rector\\DowngradePhp72\\Rector\\FuncCall\\DowngradeStreamIsattyRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp72/Rector/FuncCall/DowngradeStreamIsattyRector.php - - - - message: '#^Unused Rector\\DowngradePhp72\\Rector\\FunctionLike\\DowngradeObjectTypeDeclarationRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php - - - - message: '#^Unused Rector\\DowngradePhp73\\Rector\\ConstFetch\\DowngradePhp73JsonConstRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp73/Rector/ConstFetch/DowngradePhp73JsonConstRector.php - - - - message: '#^Unused Rector\\DowngradePhp73\\Rector\\FuncCall\\DowngradeArrayKeyFirstLastRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php - - - - message: '#^Unused Rector\\DowngradePhp73\\Rector\\FuncCall\\DowngradeTrailingCommasInFunctionCallsRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php - - - - message: '#^Unused Rector\\DowngradePhp73\\Rector\\String_\\DowngradeFlexibleHeredocSyntaxRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp73/Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php - - - - message: '#^Unused Rector\\DowngradePhp73\\Rector\\Unset_\\DowngradeTrailingCommasInUnsetRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp73/Rector/Unset_/DowngradeTrailingCommasInUnsetRector.php - - - - message: '#^Unused Rector\\DowngradePhp74\\Rector\\Array_\\DowngradeArraySpreadRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php - - - - message: '#^Unused Rector\\DowngradePhp74\\Rector\\ArrowFunction\\ArrowFunctionToAnonymousFunctionRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp74/Rector/ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php - - - - message: '#^Unused Rector\\DowngradePhp74\\Rector\\ClassMethod\\DowngradeContravariantArgumentTypeRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php - - - - message: '#^Unused Rector\\DowngradePhp74\\Rector\\ClassMethod\\DowngradeCovariantReturnTypeRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php - - - - message: '#^Unused Rector\\DowngradePhp74\\Rector\\FuncCall\\DowngradeStripTagsCallWithArrayRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php - - - - message: '#^Unused Rector\\DowngradePhp74\\Rector\\Identical\\DowngradeFreadFwriteFalsyToNegationRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp74/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php - - - - message: '#^Unused Rector\\DowngradePhp74\\Rector\\Interface_\\DowngradePreviouslyImplementedInterfaceRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp74/Rector/Interface_/DowngradePreviouslyImplementedInterfaceRector.php - - - - message: '#^Unused Rector\\DowngradePhp74\\Rector\\Property\\DowngradeTypedPropertyRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\NodeAnalyzer\\EnumAnalyzer\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/NodeAnalyzer/EnumAnalyzer.php - - - - message: '#^Unused Rector\\DowngradePhp80\\NodeAnalyzer\\NamedToUnnamedArgs\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/NodeAnalyzer/NamedToUnnamedArgs.php - - - - message: '#^Unused Rector\\DowngradePhp80\\NodeAnalyzer\\UnnamedArgumentResolver\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/NodeAnalyzer/UnnamedArgumentResolver.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\Catch_\\DowngradeNonCapturingCatchesRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/Catch_/DowngradeNonCapturingCatchesRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\ClassMethod\\DowngradeAbstractPrivateMethodInTraitRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/ClassMethod/DowngradeAbstractPrivateMethodInTraitRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\ClassMethod\\DowngradeRecursiveDirectoryIteratorHasChildrenRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\ClassMethod\\DowngradeStaticTypeDeclarationRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\ClassMethod\\DowngradeStringReturnTypeOnToStringRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/ClassMethod/DowngradeStringReturnTypeOnToStringRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\ClassMethod\\DowngradeTrailingCommasInParamUseRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\Class_\\DowngradeAttributeToAnnotationRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/Class_/DowngradeAttributeToAnnotationRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\Class_\\DowngradePropertyPromotionRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\Enum_\\DowngradeEnumToConstantListClassRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/Enum_/DowngradeEnumToConstantListClassRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\Expression\\DowngradeMatchToSwitchRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\Expression\\DowngradeThrowExprRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\FuncCall\\DowngradeArrayFilterNullableCallbackRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/FuncCall/DowngradeArrayFilterNullableCallbackRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\FuncCall\\DowngradeNumberFormatNoFourthArgRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/FuncCall/DowngradeNumberFormatNoFourthArgRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\FuncCall\\DowngradeSubstrFalsyRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/FuncCall/DowngradeSubstrFalsyRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\FunctionLike\\DowngradeMixedTypeDeclarationRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\FunctionLike\\DowngradeUnionTypeDeclarationRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\Instanceof_\\DowngradePhp80ResourceReturnToObjectRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\MethodCall\\DowngradeNamedArgumentRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\MethodCall\\DowngradeReflectionClassGetConstantsFilterRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionClassGetConstantsFilterRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\New_\\DowngradeArbitraryExpressionsSupportRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\Property\\DowngradeMixedTypeTypedPropertyRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/Property/DowngradeMixedTypeTypedPropertyRector.php - - - - message: '#^Unused Rector\\DowngradePhp80\\Rector\\Property\\DowngradeUnionTypeTypedPropertyRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector.php - - - - message: '#^Unused Rector\\DowngradePhp81\\NodeFactory\\ArrayMergeFromArraySpreadFactory\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp81/NodeFactory/ArrayMergeFromArraySpreadFactory.php - - - - message: '#^Unused Rector\\DowngradePhp81\\NodeManipulator\\ObjectToResourceReturn\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp81/NodeManipulator/ObjectToResourceReturn.php - - - - message: '#^Unused Rector\\DowngradePhp81\\Rector\\ClassConst\\DowngradeFinalizePublicClassConstantRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp81/Rector/ClassConst/DowngradeFinalizePublicClassConstantRector.php - - - - message: '#^Unused Rector\\DowngradePhp81\\Rector\\ClassMethod\\AddReturnTypeWillChangeAttributeRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp81/Rector/ClassMethod/AddReturnTypeWillChangeAttributeRector.php - - - - message: '#^Unused Rector\\DowngradePhp81\\Rector\\FuncCall\\DowngradeArrayIsListRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp81/Rector/FuncCall/DowngradeArrayIsListRector.php - - - - message: '#^Unused Rector\\DowngradePhp81\\Rector\\FuncCall\\DowngradeHashAlgorithmXxHashRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php - - - - message: '#^Unused Rector\\DowngradePhp81\\Rector\\FunctionLike\\DowngradeNeverTypeDeclarationRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp81/Rector/FunctionLike/DowngradeNeverTypeDeclarationRector.php - - - - message: '#^Unused Rector\\DowngradePhp81\\Rector\\FunctionLike\\DowngradeNewInInitializerRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php - - - - message: '#^Unused Rector\\DowngradePhp81\\Rector\\FunctionLike\\DowngradePureIntersectionTypeRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp81/Rector/FunctionLike/DowngradePureIntersectionTypeRector.php - - - - message: '#^Unused Rector\\DowngradePhp81\\Rector\\Instanceof_\\DowngradePhp81ResourceReturnToObjectRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp81/Rector/Instanceof_/DowngradePhp81ResourceReturnToObjectRector.php - - - - message: '#^Unused Rector\\DowngradePhp81\\Rector\\Property\\DowngradeReadonlyPropertyRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp81/Rector/Property/DowngradeReadonlyPropertyRector.php - - - - message: '#^Unused Rector\\DowngradePhp81\\Rector\\StmtsAwareInterface\\DowngradeSetAccessibleReflectionPropertyRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp81/Rector/StmtsAwareInterface/DowngradeSetAccessibleReflectionPropertyRector.php - - - - message: '#^Unused Rector\\DowngradePhp82\\NodeManipulator\\DowngradeReadonlyClassManipulator\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp82/NodeManipulator/DowngradeReadonlyClassManipulator.php - - - - message: '#^Unused Rector\\DowngradePhp82\\Rector\\ArrowFunction\\DowngradeArrowFunctionNeverReturnTypeRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp82/Rector/ArrowFunction/DowngradeArrowFunctionNeverReturnTypeRector.php - - - - message: '#^Unused Rector\\DowngradePhp82\\Rector\\Class_\\DowngradeReadonlyClassRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp82/Rector/Class_/DowngradeReadonlyClassRector.php - - - - message: '#^Unused Rector\\DowngradePhp82\\Rector\\Class_\\DowngradeUnionIntersectionRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp82/Rector/Class_/DowngradeUnionIntersectionRector.php - - - - message: '#^Unused Rector\\DowngradePhp82\\Rector\\FuncCall\\DowngradeIteratorCountToArrayRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp82/Rector/FuncCall/DowngradeIteratorCountToArrayRector.php - - - - message: '#^Unused Rector\\DowngradePhp82\\Rector\\FunctionLike\\DowngradeStandaloneNullTrueFalseReturnTypeRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp82/Rector/FunctionLike/DowngradeStandaloneNullTrueFalseReturnTypeRector.php - - - - message: '#^Unused Rector\\DowngradePhp82\\Rector\\MethodCall\\DowngradeReflectionMethodHasPrototypeRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp82/Rector/MethodCall/DowngradeReflectionMethodHasPrototypeRector.php - - - - message: '#^Unused Rector\\DowngradePhp83\\Rector\\ClassConst\\DowngradeTypedClassConstRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp83/Rector/ClassConst/DowngradeTypedClassConstRector.php - - - - message: '#^Unused Rector\\DowngradePhp83\\Rector\\Class_\\DowngradeReadonlyAnonymousClassRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp83/Rector/Class_/DowngradeReadonlyAnonymousClassRector.php - - - - message: '#^Unused Rector\\DowngradePhp83\\Rector\\FuncCall\\DowngradeJsonValidateRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp83/Rector/FuncCall/DowngradeJsonValidateRector.php - - - - message: '#^Unused Rector\\DowngradePhp84\\Rector\\ClassMethod\\DowngradeDeprecatedAttributeRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp84/Rector/ClassMethod/DowngradeDeprecatedAttributeRector.php - - - - message: '#^Unused Rector\\DowngradePhp84\\Rector\\Class_\\DowngradeFinalPropertyRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp84/Rector/Class_/DowngradeFinalPropertyRector.php - - - - message: '#^Unused Rector\\DowngradePhp84\\Rector\\Expression\\DowngradeArrayAllRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp84/Rector/Expression/DowngradeArrayAllRector.php - - - - message: '#^Unused Rector\\DowngradePhp84\\Rector\\Expression\\DowngradeArrayAnyRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp84/Rector/Expression/DowngradeArrayAnyRector.php - - - - message: '#^Unused Rector\\DowngradePhp84\\Rector\\Expression\\DowngradeArrayFindKeyRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindKeyRector.php - - - - message: '#^Unused Rector\\DowngradePhp84\\Rector\\Expression\\DowngradeArrayFindRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp84/Rector/Expression/DowngradeArrayFindRector.php - - - - message: '#^Unused Rector\\DowngradePhp85\\Rector\\Class_\\DowngradeFinalPropertyPromotionRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp85/Rector/Class_/DowngradeFinalPropertyPromotionRector.php - - - - message: '#^Unused Rector\\DowngradePhp85\\Rector\\Expression\\DowngradeVoidCastRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp85/Rector/Expression/DowngradeVoidCastRector.php - - - - message: '#^Unused Rector\\DowngradePhp85\\Rector\\StmtsAwareInterface\\DowngradePipeOperatorRector\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: rules/DowngradePhp85/Rector/StmtsAwareInterface/DowngradePipeOperatorRector.php - - - - message: '#^Unused Rector\\NodeAnalyzer\\DefineFuncCallAnalyzer\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: src/NodeAnalyzer/DefineFuncCallAnalyzer.php - - - - message: '#^Unused Rector\\NodeAnalyzer\\ExprInTopStmtMatcher\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: src/NodeAnalyzer/ExprInTopStmtMatcher.php - - - - message: '#^Unused Rector\\NodeFactory\\ClassFromEnumFactory\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: src/NodeFactory/ClassFromEnumFactory.php - - - - message: '#^Unused Rector\\NodeFactory\\DoctrineAnnotationFactory\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: src/NodeFactory/DoctrineAnnotationFactory.php - - - - message: '#^Unused Rector\\NodeFactory\\NamedVariableFactory\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: src/NodeFactory/NamedVariableFactory.php - - - - message: '#^Unused Rector\\NodeManipulator\\PropertyDecorator\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: src/NodeManipulator/PropertyDecorator.php - - - - message: '#^Unused Rector\\PhpDocDecorator\\PhpDocFromTypeDeclarationDecorator\:\:__construct$#' - identifier: shipmonk.deadMethod - count: 1 - path: src/PhpDocDecorator/PhpDocFromTypeDeclarationDecorator.php diff --git a/phpstan.neon b/phpstan.neon index 0689c3f0..86fe6158 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,4 @@ includes: - - phpstan-baseline.neon - vendor/symplify/phpstan-rules/config/rector-rules.neon parameters: @@ -43,6 +42,11 @@ parameters: narrow_return: true ignoreErrors: + # DI-container instantiated constructors + - + identifier: shipmonk.deadMethod + message: '#^Unused .*?::__construct$#' + # php enum value minus - '#Parameter \#1 \$phpVersion of method Rector\\Config\\RectorConfig\:\:phpVersion\(\) expects (.*?), (.*?) given#'