From a5c5bde77fa0b7f3027fa71e4679f53f407477fb Mon Sep 17 00:00:00 2001 From: Sebastian Blank Date: Wed, 19 Jul 2023 11:02:20 +0200 Subject: [PATCH] PhpStan: Add strict mode check (#15115) * PhpStan: Add strict mode check * Update baseline --- composer.json | 1 + phpstan-baseline.neon | 814 ++++++++++++++++++++++++++++++++++++++-- phpstan-parameters.neon | 38 +- phpstan.neon | 1 + 4 files changed, 827 insertions(+), 27 deletions(-) diff --git a/composer.json b/composer.json index d643e968579..b998254fcbc 100644 --- a/composer.json +++ b/composer.json @@ -139,6 +139,7 @@ "codeception/codeception": "^5.0.3", "codeception/module-symfony": "^3.1.0", "codeception/phpunit-wrapper": "^9", + "ergebnis/phpstan-rules": "^2.0", "phpstan/phpstan": "1.10.5", "phpstan/phpstan-symfony": "^1.2.20", "phpunit/phpunit": "^9.3", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 230348dc70c..6bf12daffd8 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,25 +1,125 @@ parameters: ignoreErrors: + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/CoreBundle/src/Command/Document/CleanupCommand.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/CoreBundle/src/Controller/WebDavController.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/CoreBundle/src/DependencyInjection/Compiler/SerializerPass.php + - message: "#^Negated boolean expression is always false\\.$#" count: 2 path: bundles/CoreBundle/src/DependencyInjection/PimcoreCoreExtension.php + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/CoreBundle/src/EventListener/Frontend/ElementListener.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/CoreBundle/src/Migrations/Version20201007000000.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/CoreBundle/src/Migrations/Version20230424084415.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/CustomReportsBundle/src/DependencyInjection/Configuration.php + - message: "#^Call to method addSetting\\(\\) on an unknown class Pimcore\\\\Bundle\\\\AdminBundle\\\\Event\\\\IndexActionSettingsEvent\\.$#" count: 1 path: bundles/CustomReportsBundle/src/EventListener/IndexSettingsListener.php + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/CustomReportsBundle/src/EventListener/IndexSettingsListener.php + - message: "#^Parameter \\$settingsEvent of method Pimcore\\\\Bundle\\\\CustomReportsBundle\\\\EventListener\\\\IndexSettingsListener\\:\\:indexSettings\\(\\) has invalid type Pimcore\\\\Bundle\\\\AdminBundle\\\\Event\\\\IndexActionSettingsEvent\\.$#" count: 1 path: bundles/CustomReportsBundle/src/EventListener/IndexSettingsListener.php + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/CustomReportsBundle/src/Tool/Config/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/CustomReportsBundle/src/Tool/Config/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/GlossaryBundle/src/DependencyInjection/Configuration.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/GlossaryBundle/src/Model/Glossary/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/GlossaryBundle/src/Model/Glossary/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/InstallBundle/src/BundleConfig/BundleWriter.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/InstallBundle/src/Event/BundleSetupEvent.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/InstallBundle/src/Event/InstallEvents.php + - message: "#^Call to an undefined method Pimcore\\\\Bundle\\\\SeoBundle\\\\Controller\\\\Document\\\\DocumentController\\:\\:getTreeNodeConfig\\(\\)\\.$#" count: 1 path: bundles/SeoBundle/src/Controller/Document/DocumentController.php + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/SeoBundle/src/Controller/Document/DocumentController.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/SeoBundle/src/Controller/MiscController.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/SeoBundle/src/Model/Redirect/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/SeoBundle/src/Model/Redirect/Listing/Dao.php + - message: "#^Access to constant CONTEXT_SEARCH on an unknown class Pimcore\\\\Bundle\\\\AdminBundle\\\\Event\\\\ElementAdminStyleEvent\\.$#" count: 1 @@ -51,54 +151,119 @@ parameters: path: bundles/SimpleBackendSearchBundle/src/Controller/SearchController.php - - message: "#^Access to an undefined property Pimcore\\\\Bundle\\\\SimpleBackendSearchBundle\\\\DataProvider\\\\GDPR\\\\Assets\\:\\:\\$config\\.$#" - count: 2 - path: bundles/SimpleBackendSearchBundle/src/DataProvider/GDPR/Assets.php + message: "#^Method Pimcore\\\\Bundle\\\\SimpleBackendSearchBundle\\\\MessageHandler\\\\SearchBackendHandler\\:\\:process\\(\\) is unused\\.$#" + count: 1 + path: bundles/SimpleBackendSearchBundle/src/MessageHandler/SearchBackendHandler.php - - message: "#^Call to an undefined method Pimcore\\\\Bundle\\\\SimpleBackendSearchBundle\\\\DataProvider\\\\GDPR\\\\Assets\\:\\:prepareQueryString\\(\\)\\.$#" - count: 3 - path: bundles/SimpleBackendSearchBundle/src/DataProvider/GDPR/Assets.php + message: "#^Method Pimcore\\\\Bundle\\\\SimpleBackendSearchBundle\\\\MessageHandler\\\\SearchBackendHandler\\:\\:shouldFlush\\(\\) is unused\\.$#" + count: 1 + path: bundles/SimpleBackendSearchBundle/src/MessageHandler/SearchBackendHandler.php - - message: "#^Call to static method extractSortingSettings\\(\\) on an unknown class Pimcore\\\\Bundle\\\\AdminBundle\\\\Helper\\\\QueryParams\\.$#" + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" count: 1 - path: bundles/SimpleBackendSearchBundle/src/DataProvider/GDPR/Assets.php + path: bundles/StaticRoutesBundle/src/DependencyInjection/Configuration.php - - message: "#^Access to an undefined property Pimcore\\\\Bundle\\\\SimpleBackendSearchBundle\\\\DataProvider\\\\GDPR\\\\DataObjects\\:\\:\\$config\\.$#" - count: 2 - path: bundles/SimpleBackendSearchBundle/src/DataProvider/GDPR/DataObjects.php + message: "#^Call to method addSetting\\(\\) on an unknown class Pimcore\\\\Bundle\\\\AdminBundle\\\\Event\\\\IndexActionSettingsEvent\\.$#" + count: 1 + path: bundles/StaticRoutesBundle/src/EventListener/IndexSettingsListener.php - - message: "#^Call to an undefined method Pimcore\\\\Bundle\\\\SimpleBackendSearchBundle\\\\DataProvider\\\\GDPR\\\\DataObjects\\:\\:prepareQueryString\\(\\)\\.$#" - count: 3 - path: bundles/SimpleBackendSearchBundle/src/DataProvider/GDPR/DataObjects.php + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/StaticRoutesBundle/src/EventListener/IndexSettingsListener.php - - message: "#^Call to static method extractSortingSettings\\(\\) on an unknown class Pimcore\\\\Bundle\\\\AdminBundle\\\\Helper\\\\QueryParams\\.$#" + message: "#^Parameter \\$settingsEvent of method Pimcore\\\\Bundle\\\\StaticRoutesBundle\\\\EventListener\\\\IndexSettingsListener\\:\\:indexSettings\\(\\) has invalid type Pimcore\\\\Bundle\\\\AdminBundle\\\\Event\\\\IndexActionSettingsEvent\\.$#" count: 1 - path: bundles/SimpleBackendSearchBundle/src/DataProvider/GDPR/DataObjects.php + path: bundles/StaticRoutesBundle/src/EventListener/IndexSettingsListener.php - - message: "#^Method Pimcore\\\\Bundle\\\\SimpleBackendSearchBundle\\\\MessageHandler\\\\SearchBackendHandler\\:\\:process\\(\\) is unused\\.$#" + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" count: 1 - path: bundles/SimpleBackendSearchBundle/src/MessageHandler/SearchBackendHandler.php + path: bundles/StaticRoutesBundle/src/Model/Staticroute/Dao.php - - message: "#^Method Pimcore\\\\Bundle\\\\SimpleBackendSearchBundle\\\\MessageHandler\\\\SearchBackendHandler\\:\\:shouldFlush\\(\\) is unused\\.$#" + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" count: 1 - path: bundles/SimpleBackendSearchBundle/src/MessageHandler/SearchBackendHandler.php + path: bundles/StaticRoutesBundle/src/Model/Staticroute/Listing/Dao.php - - message: "#^Call to method addSetting\\(\\) on an unknown class Pimcore\\\\Bundle\\\\AdminBundle\\\\Event\\\\IndexActionSettingsEvent\\.$#" + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" count: 1 - path: bundles/StaticRoutesBundle/src/EventListener/IndexSettingsListener.php + path: bundles/TinymceBundle/src/DependencyInjection/Configuration.php - - message: "#^Parameter \\$settingsEvent of method Pimcore\\\\Bundle\\\\StaticRoutesBundle\\\\EventListener\\\\IndexSettingsListener\\:\\:indexSettings\\(\\) has invalid type Pimcore\\\\Bundle\\\\AdminBundle\\\\Event\\\\IndexActionSettingsEvent\\.$#" + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" count: 1 - path: bundles/StaticRoutesBundle/src/EventListener/IndexSettingsListener.php + path: bundles/UuidBundle/src/DependencyInjection/Configuration.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/UuidBundle/src/DependencyInjection/PimcoreUuidExtension.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/UuidBundle/src/Installer.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/UuidBundle/src/Migrations/Version20230203160742.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/UuidBundle/src/Model/Tool/UUID/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/UuidBundle/src/Model/Tool/UUID/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/UuidBundle/src/PimcoreUuidBundle.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/WordExportBundle/src/Controller/TranslationController.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: bundles/XliffBundle/src/Event/Model/TranslationXliffEvent.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: lib/Controller/Traits/JsonHelperTrait.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: lib/Controller/UserAwareController.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: lib/Extension/Bundle/PimcoreBundleAdminClassicInterface.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: lib/Extension/Bundle/Traits/BundleAdminClassicTrait.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: lib/Image/Adapter.php - message: "#^Negated boolean expression is always false\\.$#" @@ -109,6 +274,62 @@ parameters: message: "#^Result of \\|\\| is always true\\.$#" count: 2 path: lib/Mail.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: lib/Model/AbstractModel.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: lib/Model/Dao/DaoTrait.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: lib/Security/Hasher/PimcoreUserPasswordHasher.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: lib/Security/User/Exception/InvalidUserException.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: lib/Security/User/TokenStorageUserResolver.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: lib/Security/User/User.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: lib/Security/User/UserLoader.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: lib/Security/User/UserProvider.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: lib/Serializer/Normalizer/ReferenceLoopNormalizer.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: lib/Serializer/Serializer.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: lib/SystemSettingsConfig.php + - message: "#^Call to an undefined method COM\\:\\:Run\\(\\)\\.$#" count: 1 @@ -119,11 +340,256 @@ parameters: count: 1 path: lib/Tool/Serialize.php + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: lib/helper-functions.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Asset.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Asset/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Asset/Image/Thumbnail.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Asset/Image/Thumbnail/Config/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Asset/Image/Thumbnail/Config/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Asset/Listing/Dao.php + - message: "#^Negated boolean expression is always true\\.$#" count: 1 path: models/Asset/Video/ImageThumbnail.php + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Asset/Video/Thumbnail/Config/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Asset/Video/Thumbnail/Config/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/AbstractObject/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/ClassDefinition/CustomLayout/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/ClassDefinition/CustomLayout/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/ClassDefinition/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/ClassDefinition/Data.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/ClassDefinition/Data/ClassSavedInterface.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/ClassDefinition/Data/Consent.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/ClassDefinition/Data/Input.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/ClassDefinition/Helper/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/ClassDefinition/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Classificationstore/CollectionConfig/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Classificationstore/CollectionConfig/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Classificationstore/CollectionGroupRelation/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Classificationstore/CollectionGroupRelation/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Classificationstore/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Classificationstore/GroupConfig/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Classificationstore/GroupConfig/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Classificationstore/KeyConfig/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Classificationstore/KeyConfig/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Classificationstore/KeyGroupRelation/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Classificationstore/KeyGroupRelation/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Classificationstore/StoreConfig/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Classificationstore/StoreConfig/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Concrete/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Data/AbstractMetadata/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Data/ElementMetadata/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Data/ObjectMetadata/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Fieldcollection/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Fieldcollection/Data/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Fieldcollection/Definition/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Folder/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Listing/Concrete/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Localizedfield/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Objectbrick/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Objectbrick/Data/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/Objectbrick/Definition/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/QuantityValue/Unit.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/QuantityValue/Unit/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/DataObject/QuantityValue/Unit/Listing/Dao.php + - message: "#^Call to method expandLocales\\(\\) on an unknown class Pimcore\\\\Bundle\\\\AdminBundle\\\\DataObject\\\\GridColumnConfig\\\\ConfigElementInterface\\.$#" count: 1 @@ -154,6 +620,36 @@ parameters: count: 1 path: models/DataObject/Service.php + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Dependency/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Document/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Document/DocType/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Document/DocType/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Document/Editable/Areablock.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Document/Editable/Dao.php + - message: "#^Class Pimcore\\\\Bundle\\\\PersonalizationBundle\\\\Model\\\\Document\\\\Targeting\\\\TargetingDocumentInterface not found\\.$#" count: 1 @@ -169,6 +665,201 @@ parameters: count: 1 path: models/Document/Editable/Snippet.php + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Document/Email/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Document/Folder/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Document/Hardlink/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Document/Link/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Document/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Document/Page/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Document/PageSnippet/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Document/Service/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Document/Snippet/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Element/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Element/Editlock/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Element/Note/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Element/Note/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Element/Recyclebin/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Element/Recyclebin/Item/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Element/Recyclebin/Item/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Element/Tag/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Element/Tag/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Element/WorkflowState/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Element/WorkflowState/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Metadata/Predefined/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Metadata/Predefined/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Notification/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Notification/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Property/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Property/Predefined/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Property/Predefined/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Schedule/Task/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Schedule/Task/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Site/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Site/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Tool/Email/Blocklist/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Tool/Email/Blocklist/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Tool/Email/Log/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Tool/Email/Log/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Tool/SettingsStore/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Tool/TmpStore/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Translation/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Translation/Listing/Dao.php + - message: "#^Call to static method get\\(\\) on an unknown class Pimcore\\\\Bundle\\\\AdminBundle\\\\Perspective\\\\Config\\.$#" count: 1 @@ -178,3 +869,78 @@ parameters: message: "#^Call to static method getAvailablePerspectives\\(\\) on an unknown class Pimcore\\\\Bundle\\\\AdminBundle\\\\Perspective\\\\Config\\.$#" count: 1 path: models/User.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/User/AbstractUser/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/User/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/User/Listing/AbstractListing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/User/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/User/Permission/Definition/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/User/Permission/Definition/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/User/Role/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/User/Role/Folder/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/User/Role/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/User/UserRole/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/User/Workspace/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Version/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/Version/Listing/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/WebsiteSetting/Dao.php + + - + message: "#^File is missing a \"declare\\(strict_types\\=1\\)\" declaration\\.$#" + count: 1 + path: models/WebsiteSetting/Listing/Dao.php diff --git a/phpstan-parameters.neon b/phpstan-parameters.neon index 2bb5ef3fff3..5c2f4121f19 100644 --- a/phpstan-parameters.neon +++ b/phpstan-parameters.neon @@ -10,9 +10,9 @@ parameters: - phpstan-bootstrap.php excludePaths: - - bundles/SeoBundle/src/Controller/Traits/DocumentTreeConfigWrapperTrait.php - - bundles/SimpleBackendSearchBundle/src/DataProvider/GDPR/Assets.php - - bundles/SimpleBackendSearchBundle/src/DataProvider/GDPR/DataObjects.php + - bundles/SeoBundle/src/Controller/Traits/DocumentTreeConfigWrapperTrait.php + - bundles/SimpleBackendSearchBundle/src/DataProvider/GDPR/Assets.php + - bundles/SimpleBackendSearchBundle/src/DataProvider/GDPR/DataObjects.php symfony: container_xml_path: var/cache/test/App_KernelTestDebugContainer.xml @@ -27,3 +27,35 @@ parameters: checkGenericClassInNonGenericObjectType: false checkMissingIterableValueType: false + + ergebnis: + final: + enabled: false + finalInAbstractClass: + enabled: false + noCompact: + enabled: false + noConstructorParameterWithDefaultValue: + enabled: false + noErrorSuppression: + enabled: false + noEval: + enabled: false + noExtends: + enabled: false + noIsset: + enabled: false + noNullableReturnTypeDeclaration: + enabled: false + noParameterWithContainerTypeDeclaration: + enabled: false + noParameterWithNullableTypeDeclaration: + enabled: false + noParameterWithNullDefaultValue: + enabled: false + noSwitch: + enabled: false + privateInFinalClass: + enabled: false + testCaseWithSuffix: + enabled: false diff --git a/phpstan.neon b/phpstan.neon index da7b30c1d99..1336eeb18c1 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,4 +1,5 @@ includes: + - vendor/ergebnis/phpstan-rules/rules.neon - vendor/phpstan/phpstan-symfony/extension.neon - phpstan-parameters.neon - phpstan-baseline.neon