Skip to content

Commit ff39d20

Browse files
committed
ci: ignore handled deprecation notice from phpstan
The code already uses the new methods if available, the deprecated method is used only on older yet still supported Nextcloud versions. Signed-off-by: Arthur Schiwon <[email protected]>
1 parent 59446ed commit ff39d20

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ You can also check [on GitHub](https://github.com/nextcloud/news/releases), the
99
### Changed
1010

1111
### Fixed
12+
- CI: silence false-positive phpstan error on a potentially deprecated method (#3029)
1213

1314

1415
# Releases

lib/Controller/PageController.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ public function index(): TemplateResponse
5757
{
5858
$status = $this->statusService->getStatus();
5959

60-
// TODO: Remove check when dropping NC 30.
60+
// TODO: Remove check when dropping NC 30. Also consider dropping the reportUnmatchedIgnoredErrors line from the phpstan config.
6161
if (class_exists('\OCP\ServerVersion')) {
6262
$version = (new \OCP\ServerVersion())->getMajorVersion();
6363
} else {
64+
/* @phpstan-ignore staticMethod.deprecated */
6465
$version = Util::getVersion()[0];
6566
}
6667

phpstan.neon.dist

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
parameters:
22
inferPrivatePropertyTypeFromConstructor: true
33
treatPhpDocTypesAsCertain: false
4+
reportUnmatchedIgnoredErrors: false
45
bootstrapFiles:
56
- %currentWorkingDirectory%/../../lib/base.php
67
excludePaths:

0 commit comments

Comments
 (0)