Skip to content

Commit

Permalink
ci: ignore handled deprecation notice from phpstan
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
blizzz committed Jan 5, 2025
1 parent 59446ed commit fa5e97d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public function index(): TemplateResponse
if (class_exists('\OCP\ServerVersion')) {
$version = (new \OCP\ServerVersion())->getMajorVersion();
} else {
/* @phpstan-ignore method.deprecated */
$version = Util::getVersion()[0];

Check failure on line 65 in lib/Controller/PageController.php

View workflow job for this annotation

GitHub Actions / phpstan: Nextcloud stable29 with 8.2

No error with identifier method.deprecated is reported on line 65.

Check failure on line 65 in lib/Controller/PageController.php

View workflow job for this annotation

GitHub Actions / phpstan: Nextcloud stable29 with 8.3

No error with identifier method.deprecated is reported on line 65.

Check failure on line 65 in lib/Controller/PageController.php

View workflow job for this annotation

GitHub Actions / phpstan: Nextcloud pre-release with 8.3

Call to deprecated method getVersion() of class OCP\Util: 31.0.0 Use \OCP\ServerVersion::getVersion

Check failure on line 65 in lib/Controller/PageController.php

View workflow job for this annotation

GitHub Actions / phpstan: Nextcloud pre-release with 8.3

No error with identifier method.deprecated is reported on line 65.
}

Expand Down

0 comments on commit fa5e97d

Please sign in to comment.