diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml index 9ea54a69d65..d8691eca502 100644 --- a/.github/workflows/lint-php-cs.yml +++ b/.github/workflows/lint-php-cs.yml @@ -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 diff --git a/lib/public/ServerVersion.php b/lib/public/ServerVersion.php index d44452d42d0..e5df2515a86 100644 --- a/lib/public/ServerVersion.php +++ b/lib/public/ServerVersion.php @@ -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; - } }