diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index f85df557c..41e056d00 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -57,10 +57,12 @@ public function index(): TemplateResponse { $status = $this->statusService->getStatus(); - // TODO: Remove check when dropping NC 30. + // TODO: Remove check when dropping NC 30. Also consider dropping the reportUnmatchedIgnoredErrors line from + // the phpstan config. if (class_exists('\OCP\ServerVersion')) { $version = (new \OCP\ServerVersion())->getMajorVersion(); } else { + /* @phpstan-ignore staticMethod.deprecated */ $version = Util::getVersion()[0]; } diff --git a/phpstan.neon.dist b/phpstan.neon.dist index c466bff2f..324b8acf2 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,6 +1,7 @@ parameters: inferPrivatePropertyTypeFromConstructor: true treatPhpDocTypesAsCertain: false + reportUnmatchedIgnoredErrors: false bootstrapFiles: - %currentWorkingDirectory%/../../lib/base.php excludePaths: