Merge pull request #56491 from nextcloud/carl/type-version

refactor(ServerVersion): Add missing type hinting
pull/56567/head
Daniel 2025-11-21 10:56:36 +07:00 committed by GitHub
commit 6bb46fde3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

@ -55,7 +55,7 @@ jobs:
- name: Set up php8.1
uses: shivammathur/setup-php@ec406be512d7077f68eed36e63f4d91bc006edc4 # v2.35.4
with:
php-version: 8.1
php-version: 8.2
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
coverage: none
ini-file: development

@ -9,11 +9,15 @@ declare(strict_types=1);
namespace OCP;
use OCP\AppFramework\Attribute\Consumable;
/**
* @since 31.0.0
*/
class ServerVersion {
#[Consumable(since: '31.0.0')]
readonly class ServerVersion {
/** @var int[] */
private array $version;
private string $versionString;
private string $build;
@ -59,6 +63,7 @@ class ServerVersion {
}
/**
* @return int[]
* @since 31.0.0
*/
public function getVersion(): array {
@ -103,6 +108,5 @@ class ServerVersion {
$version .= ' Build:' . $build;
}
return $version;
}
}