diff --git a/Build/phpstan.level2.neon b/Build/phpstan.level2.neon index 514b6d12b2c2bd39e7cbbce9173fd19e416ac49a..67d2e22afbd9e97cbf2753e41e8214506cccd21e 100644 --- a/Build/phpstan.level2.neon +++ b/Build/phpstan.level2.neon @@ -1,7 +1,7 @@ parameters: checkClassCaseSensitivity: true # checkThisOnly: false - checkPhpDocMissingReturn: true + checkPhpDocMissingReturn: false # todo: set to true rules: - PHPStan\Rules\Cast\EchoRule @@ -22,7 +22,7 @@ rules: - PHPStan\Rules\Operators\InvalidBinaryOperationRule - PHPStan\Rules\Operators\InvalidUnaryOperationRule - PHPStan\Rules\Operators\InvalidComparisonOperationRule - - PHPStan\Rules\PhpDoc\IncompatiblePhpDocTypeRule +# - PHPStan\Rules\PhpDoc\IncompatiblePhpDocTypeRule - PHPStan\Rules\PhpDoc\IncompatiblePropertyPhpDocTypeRule - PHPStan\Rules\PhpDoc\InvalidPhpDocTagValueRule - PHPStan\Rules\PhpDoc\InvalidPHPStanDocTagRule @@ -30,6 +30,14 @@ rules: - PHPStan\Rules\PhpDoc\WrongVariableNameInVarTagRule services: + - + class: PHPStan\Rules\Classes\MixinRule + arguments: + checkClassCaseSensitivity: %checkClassCaseSensitivity% + + tags: + - phpstan.rules.rule + - class: PHPStan\Rules\Functions\CallCallablesRule arguments: diff --git a/Build/phpstan.level3.neon b/Build/phpstan.level3.neon index d07dd93948d2bc2ebf6b76698a45ebccc2c47dce..a93009e2bd2c5ccc26f55c0d4927c83c7322191c 100644 --- a/Build/phpstan.level3.neon +++ b/Build/phpstan.level3.neon @@ -10,7 +10,6 @@ rules: - PHPStan\Rules\Arrays\UnpackIterableInArrayRule - PHPStan\Rules\Functions\ArrowFunctionReturnTypeRule - PHPStan\Rules\Functions\ClosureReturnTypeRule - - PHPStan\Rules\Functions\ReturnTypeRule - PHPStan\Rules\Generators\YieldTypeRule # - PHPStan\Rules\Methods\ReturnTypeRule - PHPStan\Rules\Properties\DefaultValueTypesAssignedToPropertiesRule @@ -18,6 +17,9 @@ rules: - PHPStan\Rules\Variables\ThrowTypeRule - PHPStan\Rules\Variables\VariableCloningRule +parameters: + checkPhpDocMethodSignatures: false # todo: set to true + services: - class: PHPStan\Rules\Arrays\AppendedArrayKeyTypeRule @@ -51,6 +53,14 @@ services: tags: - phpstan.rules.rule +# - +# class: PHPStan\Rules\Functions\ReturnTypeRule +# arguments: +# functionReflector: @betterReflectionFunctionReflector +# +# tags: +# - phpstan.rules.rule + - class: PHPStan\Rules\Generators\YieldFromTypeRule arguments: @@ -66,12 +76,3 @@ services: tags: - phpstan.rules.rule - -# - -# class: PHPStan\Rules\Methods\MethodSignatureRule -# arguments: -# reportMaybes: %reportMaybesInMethodSignatures% -# reportStatic: %reportStaticMethodSignatures% -# -# tags: -# - phpstan.rules.rule diff --git a/Build/phpstan.level4.neon b/Build/phpstan.level4.neon index f57d4a31fa694e57226347beeea61a033a898df8..58723da96242107d095ee6d807c8158bbf04b94b 100644 --- a/Build/phpstan.level4.neon +++ b/Build/phpstan.level4.neon @@ -5,7 +5,7 @@ rules: # - PHPStan\Rules\Arrays\DeadForeachRule # - PHPStan\Rules\Comparison\NumberComparisonOperatorsConstantConditionRule - PHPStan\Rules\DeadCode\NoopRule - - PHPStan\Rules\DeadCode\UnreachableStatementRule +# - PHPStan\Rules\DeadCode\UnreachableStatementRule - PHPStan\Rules\Exceptions\DeadCatchRule # - PHPStan\Rules\Functions\CallToFunctionStamentWithoutSideEffectsRule - PHPStan\Rules\Methods\CallToMethodStamentWithoutSideEffectsRule diff --git a/composer.json b/composer.json index 93e4aca65f6ac89a727c091fb0ef2fdc59293df0..3940111101538246a23184fe9508cf1e45e8153f 100644 --- a/composer.json +++ b/composer.json @@ -85,10 +85,10 @@ "codeception/module-webdriver": "^1.0.1", "composer/package-versions-deprecated": "^1.10", "friendsofphp/php-cs-fixer": "^2.16.1", - "friendsoftypo3/phpstan-typo3": "^0.3.0", + "friendsoftypo3/phpstan-typo3": "^0.4.0", "php-webdriver/webdriver": "^1.8", "phpspec/prophecy": "^1.7.5", - "phpstan/phpstan": "^0.12.13", + "phpstan/phpstan": "^0.12.37", "rector/rector": "^0.7.14", "typo3/cms-styleguide": "~10.0.2", "typo3/testing-framework": "^6.3.3" diff --git a/composer.lock b/composer.lock index 6f27576d4e0401e4d97c7f16281dbb3ee9437ef5..95df8d166233309fe010311af3bbc3d294afeb49 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9f1a24a857fcd910af3c87ab1fced394", + "content-hash": "44f430feb41c47dfb37d4e426a945c54", "packages": [ { "name": "cogpowered/finediff", @@ -2601,6 +2601,20 @@ "polyfill", "portable" ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-02-27T09:26:54+00:00" }, { @@ -2659,6 +2673,20 @@ "portable", "shim" ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-02-27T09:26:54+00:00" }, { @@ -2721,6 +2749,20 @@ "portable", "shim" ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-03-09T19:04:49+00:00" }, { @@ -2780,6 +2822,20 @@ "portable", "shim" ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-03-09T19:04:49+00:00" }, { @@ -2835,6 +2891,20 @@ "portable", "shim" ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-02-27T09:26:54+00:00" }, { @@ -2893,6 +2963,20 @@ "portable", "shim" ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-02-27T09:26:54+00:00" }, { @@ -4800,23 +4884,23 @@ }, { "name": "friendsoftypo3/phpstan-typo3", - "version": "0.3.0", + "version": "0.4.0", "source": { "type": "git", "url": "https://github.com/FriendsOfTYPO3/phpstan-typo3.git", - "reference": "d5db3d0b4d5b1db1cf9e4c4139d808d9a105eaf4" + "reference": "634dafe109923ee4a556200ddf80951f3714c935" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfTYPO3/phpstan-typo3/zipball/d5db3d0b4d5b1db1cf9e4c4139d808d9a105eaf4", - "reference": "d5db3d0b4d5b1db1cf9e4c4139d808d9a105eaf4", + "url": "https://api.github.com/repos/FriendsOfTYPO3/phpstan-typo3/zipball/634dafe109923ee4a556200ddf80951f3714c935", + "reference": "634dafe109923ee4a556200ddf80951f3714c935", "shasum": "" }, "require": { "php": "^7.2", - "phpstan/phpstan": "^0.12.14", - "typo3/cms-core": "^10.0 || 11.0.*@dev", - "typo3/cms-extbase": "^10.0 || 11.0.*@dev" + "phpstan/phpstan": "^0.12.28", + "typo3/cms-core": "11.0.*@dev", + "typo3/cms-extbase": "11.0.*@dev" }, "require-dev": { "ergebnis/composer-normalize": "^2.3", @@ -4835,7 +4919,7 @@ "GPL-2.0-or-later" ], "description": "TYPO3 rules for PHPStan", - "time": "2020-05-26T08:20:57+00:00" + "time": "2020-06-10T15:34:04+00:00" }, { "name": "jean85/pretty-package-versions", @@ -5947,20 +6031,23 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.14", + "version": "0.12.37", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "37bdd26a80235d0f9045b49f4151102b7831cbe2" + "reference": "5e16d83e6eb2dd784fbdaeaece5e2bca72e4f68a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/37bdd26a80235d0f9045b49f4151102b7831cbe2", - "reference": "37bdd26a80235d0f9045b49f4151102b7831cbe2", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/5e16d83e6eb2dd784fbdaeaece5e2bca72e4f68a", + "reference": "5e16d83e6eb2dd784fbdaeaece5e2bca72e4f68a", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" }, "bin": [ "phpstan", @@ -5982,7 +6069,21 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", - "time": "2020-03-02T22:29:43+00:00" + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpstan", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2020-08-09T14:32:41+00:00" }, { "name": "phpstan/phpstan-phpunit", @@ -8109,8 +8210,8 @@ "authors": [ { "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "role": "Developer", + "email": "arne@blankerts.de" } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", diff --git a/phpstan.neon b/phpstan.neon index de9b75a8686384f9f8959df6a59f1b7d6f347098..12b88e37a611053458a36d63638ab2068f76e735 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -10,6 +10,8 @@ parameters: # Set to true during local runs to find unmatched ignored errors. bamboo needs this to be set to false. reportUnmatchedIgnoredErrors: false + scanDirectories: + - %currentWorkingDirectory%/typo3/sysext/ paths: - %currentWorkingDirectory%/typo3/sysext/ @@ -21,7 +23,7 @@ parameters: ignoreErrors: # ignored errors for level 0 - - '#Undefined variable: \$_EXTKEY#' + - '#Variable \$_EXTKEY might not be defined\.#' - message: '#Instantiated class Composer\\Util\\Filesystem not found\.#' path: %currentWorkingDirectory%/typo3/sysext/core/Classes/Composer/CliEntryPoint.php diff --git a/typo3/sysext/core/composer.json b/typo3/sysext/core/composer.json index 45544f3fb4864b56c030bf18af8ede91011db1fe..2414454cb147e5aa266325635e345a7f5b0578cc 100644 --- a/typo3/sysext/core/composer.json +++ b/typo3/sysext/core/composer.json @@ -68,7 +68,7 @@ "codeception/module-webdriver": "^1.0.1", "friendsofphp/php-cs-fixer": "^2.16.1", "phpspec/prophecy": "^1.7.5", - "phpstan/phpstan": "^0.12.13", + "phpstan/phpstan": "^0.12.37", "typo3/cms-styleguide": "~10.0.2", "typo3/testing-framework": "^6.3.3" },