includes: - vendor/friendsoftypo3/phpstan-typo3/extension.neon - Build/phpstan.level8.neon - Build/phpstan.php7config.php - Build/phpstan.php8config.php # Include bleeding edge rules if necessary but do not commit # - vendor/phpstan/phpstan/conf/bleedingEdge.neon parameters: # Use local .cache dir instead of /tmp tmpDir: .cache/phpstan parallel: # Don't be overly greedy on machines with more CPU's to be a good neighbor especially on CI maximumNumberOfProcesses: 5 level: 2 # level 2 parameters which are set to opposite values in the original level 2 configuration. Parameters need to be # set to their opposite values and the resulting errors need to be fixed. Once they are fixed, the parameters can be # removed from this file. checkThisOnly: true checkPhpDocMissingReturn: false reportUnmatchedIgnoredErrors: true scanDirectories: - %currentWorkingDirectory%/typo3/sysext/ paths: - %currentWorkingDirectory%/typo3/sysext/ excludes_analyse: - %currentWorkingDirectory%/typo3/sysext/*/Tests/* - %currentWorkingDirectory%/typo3/sysext/*/Documentation/* - %currentWorkingDirectory%/typo3/sysext/*/Resources/* - %currentWorkingDirectory%/typo3/sysext/*/Configuration/* - %currentWorkingDirectory%/typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php ignoreErrors: - "#^Parameter \\#1 \\$disable of function libxml_disable_entity_loader expects bool, bool\\|null given\\.$#" - message: "#^Instantiated class Composer\\\\Package\\\\Package not found\\.$#" count: 1 path: typo3/sysext/core/Classes/Composer/PackageArtifactBuilder.php - message: "#^Instantiated class Composer\\\\Util\\\\Filesystem not found\\.$#" count: 2 path: typo3/sysext/core/Classes/Composer/PackageArtifactBuilder.php - message: "#^Parameter \\$filesystem of method TYPO3\\\\CMS\\\\Core\\\\Package\\\\Cache\\\\ComposerPackageArtifact\\:\\:__construct\\(\\) has invalid typehint type Composer\\\\Util\\\\Filesystem\\.$#" count: 1 path: typo3/sysext/core/Classes/Package/Cache/ComposerPackageArtifact.php - message: "#^Property TYPO3\\\\CMS\\\\Core\\\\Package\\\\Cache\\\\ComposerPackageArtifact\\:\\:\\$filesystem has unknown class Composer\\\\Util\\\\Filesystem as its type\\.$#" count: 1 path: typo3/sysext/core/Classes/Package/Cache/ComposerPackageArtifact.php - message: "#^Parameter \\$filesystem of method TYPO3\\\\CMS\\\\Core\\\\Package\\\\Package\\:\\:makePathRelative\\(\\) has invalid typehint type Composer\\\\Util\\\\Filesystem\\.$#" count: 1 path: typo3/sysext/core/Classes/Package/Package.php - message: "#^Call to static method isPlatformPackage\\(\\) on an unknown class Composer\\\\Repository\\\\PlatformRepository\\.$#" count: 1 path: typo3/sysext/core/Classes/Composer/PackageArtifactBuilder.php # ignored errors for level 0 - '#Variable \$_EXTKEY might not be defined\.#' - message: '#Instantiated class Composer\\Util\\Filesystem not found\.#' path: %currentWorkingDirectory%/typo3/sysext/core/Classes/Composer/CliEntryPoint.php - message: '#Parameter \$event of method [\w\\]+::\w+\(\) has invalid typehint type Composer\\Script\\Event\.#' path: %currentWorkingDirectory%/typo3/sysext/*/Classes/Composer/* - message: "#^Access to undefined constant static\\(TYPO3\\\\CMS\\\\Core\\\\Type\\\\Enumeration\\)\\:\\:__default\\.$#" count: 1 path: typo3/sysext/core/Classes/Type/Enumeration.php - message: "#^Unsafe usage of new static\\(\\)\\.$#" count: 1 path: typo3/sysext/core/Classes/Collection/AbstractRecordCollection.php - message: "#^Unsafe usage of new static\\(\\)\\.$#" count: 1 path: typo3/sysext/core/Classes/Type/Enumeration.php - message: "#^Unsafe usage of new static\\(\\)\\.$#" count: 1 path: typo3/sysext/workspaces/Classes/Domain/Record/WorkspaceRecord.php - message: "#^Call to an undefined static method TYPO3Fluid\\\\Fluid\\\\Core\\\\Rendering\\\\RenderingContext\\:\\:getParserConfiguration\\(\\)\\.$#" count: 1 path: typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php # ignored errors for level 1 - message: "#^Variable \\$value in isset\\(\\) always exists and is not nullable\\.$#" count: 1 path: typo3/sysext/backend/Classes/Utility/BackendUtility.php - message: "#^Variable \\$pidConf in isset\\(\\) always exists and is not nullable\\.$#" count: 1 path: typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php - message: "#^Constructor of class TYPO3\\\\CMS\\\\Frontend\\\\Plugin\\\\AbstractPlugin has an unused parameter \\$_\\.$#" count: 1 path: typo3/sysext/frontend/Classes/Plugin/AbstractPlugin.php - message: "#^Constructor of class TYPO3\\\\CMS\\\\RteCKEditor\\\\Form\\\\Resolver\\\\RichTextNodeResolver has an unused parameter \\$nodeFactory\\.$#" count: 1 path: typo3/sysext/rte_ckeditor/Classes/Form/Resolver/RichTextNodeResolver.php # Ignored errors for level 3 - message: "#^Property TYPO3\\\\CMS\\\\Belog\\\\Domain\\\\Model\\\\LogEntry\\:\\:\\$newId \\(string\\) does not accept default value of type int\\.$#" count: 1 path: typo3/sysext/belog/Classes/Domain/Model/LogEntry.php # checkPhpDocMethodSignatures - message: "#^Return type \\(TYPO3\\\\CMS\\\\Core\\\\Database\\\\Query\\\\Expression\\\\ExpressionBuilder\\) of method TYPO3\\\\CMS\\\\Core\\\\Database\\\\Connection\\:\\:getExpressionBuilder\\(\\) should be compatible with return type \\(Doctrine\\\\DBAL\\\\Query\\\\Expression\\\\ExpressionBuilder\\) of method Doctrine\\\\DBAL\\\\Connection\\:\\:getExpressionBuilder\\(\\)$#" count: 1 path: typo3/sysext/core/Classes/Database/Connection.php - message: "#^Return type \\(TYPO3\\\\CMS\\\\Core\\\\Database\\\\Query\\\\QueryBuilder\\) of method TYPO3\\\\CMS\\\\Core\\\\Database\\\\Connection\\:\\:createQueryBuilder\\(\\) should be compatible with return type \\(Doctrine\\\\DBAL\\\\Query\\\\QueryBuilder\\) of method Doctrine\\\\DBAL\\\\Connection\\:\\:createQueryBuilder\\(\\)$#" count: 1 path: typo3/sysext/core/Classes/Database/Connection.php # TypesAssignedToPropertiesRule - message: "#^Property Doctrine\\\\DBAL\\\\Schema\\\\SchemaDiff\\:\\:\\$newTables \\(array\\<Doctrine\\\\DBAL\\\\Schema\\\\Table\\>\\) does not accept array\\<Doctrine\\\\DBAL\\\\Schema\\\\TableDiff\\>\\.$#" count: 1 path: typo3/sysext/core/Classes/Database/Schema/ConnectionMigrator.php - message: "#^Property Doctrine\\\\DBAL\\\\Schema\\\\SchemaDiff\\:\\:\\$removedTables \\(array\\<Doctrine\\\\DBAL\\\\Schema\\\\Table\\>\\) does not accept array\\<Doctrine\\\\DBAL\\\\Schema\\\\TableDiff\\>\\.$#" count: 1 path: typo3/sysext/core/Classes/Database/Schema/ConnectionMigrator.php # Ignored errors for level 4 - message: "#^Ternary operator condition is always false\\.$#" count: 1 path: typo3/sysext/backend/Classes/Form/Element/SelectCheckBoxElement.php - message: "#^Ternary operator condition is always true\\.$#" count: 2 path: typo3/sysext/backend/Classes/Form/Element/SelectSingleElement.php - message: "#^Instanceof between TYPO3\\\\CMS\\\\Extbase\\\\Domain\\\\Model\\\\Category\\|null and TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\Generic\\\\LazyLoadingProxy will always evaluate to false\\.$#" count: 1 path: typo3/sysext/extbase/Classes/Domain/Model/Category.php - message: "#^Instanceof between TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File and TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileReference will always evaluate to false\\.$#" count: 1 path: typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php # Ignored errors for level 5 - message: "#^Parameter \\#1 \\$constraint of static method TYPO3\\\\CMS\\\\Core\\\\Database\\\\Query\\\\QueryHelper\\:\\:stripLogicalOperatorPrefix\\(\\) expects string, string\\|null given\\.$#" count: 1 path: typo3/sysext/core/Classes/Database/QueryView.php - message: "#^Parameter \\#2 \\$id of method TYPO3\\\\CMS\\\\Core\\\\DataHandling\\\\DataHandler\\:\\:getRecordProperties\\(\\) expects int, int\\|string given\\.$#" count: 2 path: typo3/sysext/core/Classes/DataHandling/DataHandler.php - message: "#^Parameter \\#5 \\$id of method TYPO3\\\\CMS\\\\Core\\\\DataHandling\\\\DataHandler\\:\\:checkValue_SW\\(\\) expects int, int\\|string given\\.$#" count: 1 path: typo3/sysext/core/Classes/DataHandling/DataHandler.php - message: "#^Parameter \\#1 \\$stageRecord of method TYPO3\\\\CMS\\\\Workspaces\\\\Controller\\\\Remote\\\\ActionHandler\\:\\:getRecipientsOfStage\\(\\) expects int\\|TYPO3\\\\CMS\\\\Workspaces\\\\Domain\\\\Record\\\\StageRecord, TYPO3\\\\CMS\\\\Workspaces\\\\Domain\\\\Record\\\\StageRecord\\|null given\\.$#" count: 1 path: typo3/sysext/workspaces/Classes/Controller/Remote/ActionHandler.php - message: "#^Parameter \\#1 \\$name of function setcookie expects string, string\\|false given\\.$#" count: 1 path: typo3/sysext/install/Classes/Service/SessionService.php - message: "#^Parameter \\#4 \\$(col|color) of function imagefill expects int, int\\|false given\\.$#" count: 1 path: typo3/sysext/frontend/Classes/Imaging/GifBuilder.php - message: "#^Parameter \\#6 \\$(col|color) of function imagefilledrectangle expects int, int\\|false given\\.$#" count: 1 path: typo3/sysext/frontend/Classes/Imaging/GifBuilder.php - message: "#^Parameter \\#1 \\$node of function dom_import_simplexml expects SimpleXMLElement, SimpleXMLElement\\|false given\\.$#" count: 1 path: typo3/sysext/frontend/Classes/ContentObject/ScalableVectorGraphicsContentObject.php - message: "#^Parameter \\#1 \\$(array_arg|array) of function current expects array, object given\\.$#" count: 1 path: typo3/sysext/extbase/Classes/Persistence/Generic/LazyLoadingProxy.php - message: "#^Parameter \\#1 \\$(array_arg|array) of function key expects array, object given\\.$#" count: 1 path: typo3/sysext/extbase/Classes/Persistence/Generic/LazyLoadingProxy.php - message: "#^Parameter \\#1 \\$(array_arg|array) of function next expects array, object given\\.$#" count: 1 path: typo3/sysext/extbase/Classes/Persistence/Generic/LazyLoadingProxy.php - message: "#^Parameter \\#1 \\$array of function reset expects array, object given\\.$#" count: 1 path: typo3/sysext/extbase/Classes/Persistence/Generic/LazyLoadingProxy.php - message: "#^Parameter \\#1 \\$currentRequest of static method TYPO3\\\\CMS\\\\Extbase\\\\Mvc\\\\Dispatcher\\:\\:buildRequestFromCurrentRequestAndForwardResponse\\(\\) expects TYPO3\\\\CMS\\\\Extbase\\\\Mvc\\\\Request, TYPO3\\\\CMS\\\\Extbase\\\\Mvc\\\\RequestInterface given\\.$#" count: 1 path: typo3/sysext/extbase/Classes/Mvc/Dispatcher.php - message: "#^Parameter \\#1 \\$node of method TYPO3\\\\CMS\\\\Core\\\\Tree\\\\TableConfiguration\\\\ArrayTreeRenderer\\:\\:renderNode\\(\\) expects TYPO3\\\\CMS\\\\Backend\\\\Tree\\\\TreeRepresentationNode, TYPO3\\\\CMS\\\\Backend\\\\Tree\\\\TreeNode given\\.$#" count: 1 path: typo3/sysext/core/Classes/Tree/TableConfiguration/ArrayTreeRenderer.php - message: "#^Parameter \\#2 \\$folder of method TYPO3\\\\CMS\\\\Core\\\\Resource\\\\ResourceStorage\\:\\:checkFolderActionPermission\\(\\) expects TYPO3\\\\CMS\\\\Core\\\\Resource\\\\Folder\\|null, TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FolderInterface given\\.$#" count: 1 path: typo3/sysext/core/Classes/Resource/ResourceStorage.php - message: "#^Parameter \\#1 \\$file of class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\Event\\\\AfterFileAddedEvent constructor expects TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileInterface, TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File\\|TYPO3\\\\CMS\\\\Core\\\\Resource\\\\ProcessedFile\\|null given\\.$#" count: 1 path: typo3/sysext/core/Classes/Resource/ResourceStorage.php - message: "#^Parameter \\#1 \\$file of method TYPO3\\\\CMS\\\\Core\\\\Resource\\\\ResourceStorage\\:\\:replaceFile\\(\\) expects TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileInterface, TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File\\|TYPO3\\\\CMS\\\\Core\\\\Resource\\\\ProcessedFile\\|null given\\.$#" count: 2 path: typo3/sysext/core/Classes/Resource/ResourceStorage.php - message: "#^Parameter \\#2 \\$package of method TYPO3\\\\CMS\\\\Core\\\\DependencyInjection\\\\ServiceProviderRegistry\\:\\:create\\(\\) expects TYPO3\\\\CMS\\\\Core\\\\Package\\\\Package\\|null, TYPO3\\\\CMS\\\\Core\\\\Package\\\\PackageInterface given\\.$#" count: 1 path: typo3/sysext/core/Classes/DependencyInjection/ServiceProviderRegistry.php - message: "#^Parameter \\#1 \\$(name|function) of class ReflectionFunction constructor expects Closure\\|string, callable\\(\\)\\: mixed given\\.$#" count: 1 path: typo3/sysext/core/Classes/DependencyInjection/ServiceProviderCompilationPass.php - message: "#^Parameter \\#1 \\$manifest of method TYPO3\\\\CMS\\\\Core\\\\Core\\\\ClassLoadingInformationGenerator\\:\\:getAutoloadSectionFromManifest\\(\\) expects stdClass, object given\\.$#" count: 2 path: typo3/sysext/core/Classes/Core/ClassLoadingInformationGenerator.php - message: "#^Parameter \\#2 \\$callback of function array_walk expects callable\\(\\)\\: mixed, array\\(\\$this\\(TYPO3\\\\CMS\\\\Core\\\\Cache\\\\Backend\\\\AbstractBackend\\), 'flushByTag'\\) given\\.$#" count: 1 path: typo3/sysext/core/Classes/Cache/Backend/AbstractBackend.php - message: "#^Parameter \\#1 \\$node of method TYPO3\\\\CMS\\\\Backend\\\\Tree\\\\Renderer\\\\UnorderedListTreeRenderer\\:\\:renderNode\\(\\) expects TYPO3\\\\CMS\\\\Backend\\\\Tree\\\\TreeRepresentationNode, TYPO3\\\\CMS\\\\Backend\\\\Tree\\\\TreeNode given\\.$#" count: 1 path: typo3/sysext/backend/Classes/Tree/Renderer/UnorderedListTreeRenderer.php - # Obsolete in v12, when either entire Request or __construct() are declared final message: "#^Unsafe usage of new static\\(\\)\\.$#" count: 23 path: typo3/sysext/extbase/Classes/Mvc/Request.php