diff --git a/app/Config/Autoload.php b/app/Config/Autoload.php index 76cd9263556e..9a928241a0eb 100644 --- a/app/Config/Autoload.php +++ b/app/Config/Autoload.php @@ -17,8 +17,6 @@ * * NOTE: This class is required prior to Autoloader instantiation, * and does not extend BaseConfig. - * - * @immutable */ class Autoload extends AutoloadConfig { diff --git a/app/Config/DocTypes.php b/app/Config/DocTypes.php index 7e8aaacf09dd..788d68fdc117 100644 --- a/app/Config/DocTypes.php +++ b/app/Config/DocTypes.php @@ -2,9 +2,6 @@ namespace Config; -/** - * @immutable - */ class DocTypes { /** diff --git a/app/Config/Mimes.php b/app/Config/Mimes.php index 7722444abe7b..b5da1a0cb62e 100644 --- a/app/Config/Mimes.php +++ b/app/Config/Mimes.php @@ -3,8 +3,6 @@ namespace Config; /** - * Mimes - * * This file contains an array of mime types. It is used by the * Upload class to help identify allowed file types. * @@ -15,8 +13,6 @@ * * When working with mime types, please make sure you have the ´fileinfo´ * extension enabled to reliably detect the media types. - * - * @immutable */ class Mimes { diff --git a/app/Config/Modules.php b/app/Config/Modules.php index 8d4bf56544b0..9e03fa491260 100644 --- a/app/Config/Modules.php +++ b/app/Config/Modules.php @@ -9,8 +9,6 @@ * * NOTE: This class is required prior to Autoloader instantiation, * and does not extend BaseConfig. - * - * @immutable */ class Modules extends BaseModules { diff --git a/app/Config/Optimize.php b/app/Config/Optimize.php index 6fb441fd2288..481e645f57b2 100644 --- a/app/Config/Optimize.php +++ b/app/Config/Optimize.php @@ -7,8 +7,6 @@ * * NOTE: This class does not extend BaseConfig for performance reasons. * So you cannot replace the property values with Environment Variables. - * - * @immutable */ class Optimize { diff --git a/app/Config/Paths.php b/app/Config/Paths.php index 262c745ffa95..3dc9c5d93951 100644 --- a/app/Config/Paths.php +++ b/app/Config/Paths.php @@ -15,8 +15,6 @@ * * NOTE: This class is required prior to Autoloader instantiation, * and does not extend BaseConfig. - * - * @immutable */ class Paths { diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index adbe8eaf1322..6f2ae839e39e 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -1,4 +1,4 @@ -# total 3511 errors +# total 3458 errors includes: - argument.type.neon - assign.propertyType.neon @@ -27,8 +27,6 @@ includes: - property.nonObject.neon - property.notFound.neon - property.phpDocType.neon - - property.readOnlyByPhpDocAssignOutOfClass.neon - - property.readOnlyByPhpDocDefaultValue.neon - staticMethod.notFound.neon - ternary.shortNotAllowed.neon - varTag.type.neon diff --git a/utils/phpstan-baseline/property.readOnlyByPhpDocAssignOutOfClass.neon b/utils/phpstan-baseline/property.readOnlyByPhpDocAssignOutOfClass.neon deleted file mode 100644 index b26204669407..000000000000 --- a/utils/phpstan-baseline/property.readOnlyByPhpDocAssignOutOfClass.neon +++ /dev/null @@ -1,83 +0,0 @@ -# total 33 errors - -parameters: - ignoreErrors: - - - message: '#^@readonly property Config\\Autoload\:\:\$classmap is assigned outside of its declaring class\.$#' - count: 2 - path: ../../tests/system/Autoloader/AutoloaderTest.php - - - - message: '#^@readonly property Config\\Autoload\:\:\$files is assigned outside of its declaring class\.$#' - count: 1 - path: ../../tests/system/Autoloader/AutoloaderTest.php - - - - message: '#^@readonly property Config\\Autoload\:\:\$helpers is assigned outside of its declaring class\.$#' - count: 1 - path: ../../tests/system/Autoloader/AutoloaderTest.php - - - - message: '#^@readonly property Config\\Autoload\:\:\$psr4 is assigned outside of its declaring class\.$#' - count: 6 - path: ../../tests/system/Autoloader/AutoloaderTest.php - - - - message: '#^@readonly property Config\\Modules\:\:\$composerPackages is assigned outside of its declaring class\.$#' - count: 3 - path: ../../tests/system/Autoloader/AutoloaderTest.php - - - - message: '#^@readonly property Config\\Modules\:\:\$discoverInComposer is assigned outside of its declaring class\.$#' - count: 8 - path: ../../tests/system/Autoloader/AutoloaderTest.php - - - - message: '#^@readonly property Config\\Modules\:\:\$enabled is assigned outside of its declaring class\.$#' - count: 1 - path: ../../tests/system/Commands/Utilities/Routes/FilterFinderTest.php - - - - message: '#^@readonly property Config\\DocTypes\:\:\$html5 is assigned outside of its declaring class\.$#' - count: 1 - path: ../../tests/system/CommonFunctionsTest.php - - - - message: '#^@readonly property Config\\Modules\:\:\$aliases is assigned outside of its declaring class\.$#' - count: 1 - path: ../../tests/system/Events/EventsTest.php - - - - message: '#^@readonly property Config\\DocTypes\:\:\$html5 is assigned outside of its declaring class\.$#' - count: 1 - path: ../../tests/system/Helpers/FormHelperTest.php - - - - message: '#^@readonly property Config\\DocTypes\:\:\$html5 is assigned outside of its declaring class\.$#' - count: 1 - path: ../../tests/system/Helpers/HTMLHelperTest.php - - - - message: '#^@readonly property Config\\Modules\:\:\$enabled is assigned outside of its declaring class\.$#' - count: 1 - path: ../../tests/system/Router/AutoRouterImprovedTest.php - - - - message: '#^@readonly property Config\\Modules\:\:\$enabled is assigned outside of its declaring class\.$#' - count: 1 - path: ../../tests/system/Router/DefinedRouteCollectorTest.php - - - - message: '#^@readonly property Config\\Modules\:\:\$enabled is assigned outside of its declaring class\.$#' - count: 1 - path: ../../tests/system/Router/RouteCollectionReverseRouteTest.php - - - - message: '#^@readonly property Config\\Modules\:\:\$enabled is assigned outside of its declaring class\.$#' - count: 3 - path: ../../tests/system/Router/RouteCollectionTest.php - - - - message: '#^@readonly property Config\\Modules\:\:\$enabled is assigned outside of its declaring class\.$#' - count: 1 - path: ../../tests/system/Router/RouterTest.php diff --git a/utils/phpstan-baseline/property.readOnlyByPhpDocDefaultValue.neon b/utils/phpstan-baseline/property.readOnlyByPhpDocDefaultValue.neon deleted file mode 100644 index 6bd85ccd63d8..000000000000 --- a/utils/phpstan-baseline/property.readOnlyByPhpDocDefaultValue.neon +++ /dev/null @@ -1,38 +0,0 @@ -# total 20 errors - -parameters: - ignoreErrors: - - - message: '#^@readonly property cannot have a default value\.$#' - count: 4 - path: ../../app/Config/Autoload.php - - - - message: '#^@readonly property cannot have a default value\.$#' - count: 2 - path: ../../app/Config/DocTypes.php - - - - message: '#^@readonly property cannot have a default value\.$#' - count: 1 - path: ../../app/Config/Mimes.php - - - - message: '#^@readonly property cannot have a default value\.$#' - count: 4 - path: ../../app/Config/Modules.php - - - - message: '#^@readonly property cannot have a default value\.$#' - count: 2 - path: ../../app/Config/Optimize.php - - - - message: '#^@readonly property cannot have a default value\.$#' - count: 5 - path: ../../app/Config/Paths.php - - - - message: '#^@readonly property cannot have a default value\.$#' - count: 2 - path: ../../system/Test/Mock/MockAutoload.php