Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-03-15 18:04:21 +0300
committerGitHub <noreply@github.com>2022-03-15 18:04:21 +0300
commit66c9fb72a3525cb19fc30cbae9ed3429d6fbda7a (patch)
tree5ae0862e948bfbff7d2c55592f95ca6a3e483d19
parent646376b0cbe8e2555d79a0c7730de6415c4c012a (diff)
parentd259209baea9706e5af7b30a6ae6ed4daab953f0 (diff)
Merge pull request #2236 from nextcloud/enh/php8.1
Support PHP 8.1
-rw-r--r--.github/workflows/lint.yml2
-rw-r--r--.github/workflows/phpunit.yml4
-rw-r--r--.github/workflows/static-analysis.yml3
-rw-r--r--lib/Db/Document.php2
-rw-r--r--lib/Db/Session.php2
-rw-r--r--lib/Db/Step.php5
6 files changed, 8 insertions, 10 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index b58f01b4c..bd0f2f53e 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- php-versions: ['7.4', '8.0']
+ php-versions: ['7.4', '8.0', '8.1']
name: php${{ matrix.php-versions }} lint
steps:
- name: Checkout
diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml
index 7d0905bfb..e86e7d6eb 100644
--- a/.github/workflows/phpunit.yml
+++ b/.github/workflows/phpunit.yml
@@ -18,7 +18,7 @@ jobs:
# do not stop on another job's failure
fail-fast: false
matrix:
- php-versions: ['7.4', '8.0']
+ php-versions: ['7.4', '8.0', '8.1']
databases: ['sqlite']
server-versions: ['master']
@@ -55,7 +55,7 @@ jobs:
# do not stop on another job's failure
fail-fast: false
matrix:
- php-versions: ['7.4', '8.0']
+ php-versions: ['7.4', '8.0', '8.1']
databases: ['oci']
server-versions: ['master']
diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml
index 4f40268c6..64c319467 100644
--- a/.github/workflows/static-analysis.yml
+++ b/.github/workflows/static-analysis.yml
@@ -8,6 +8,7 @@ jobs:
strategy:
matrix:
ocp-version: [ 'dev-master' ]
+ php-version: [ '7.4', '8.0', '8.1' ]
name: Nextcloud ${{ matrix.ocp-version }}
steps:
- name: Checkout
@@ -15,7 +16,7 @@ jobs:
- name: Set up php
uses: shivammathur/setup-php@master
with:
- php-version: 7.4
+ php-version: {{ matrix.php-version }}
tools: composer:v1
coverage: none
- name: Install dependencies
diff --git a/lib/Db/Document.php b/lib/Db/Document.php
index ae3dd43ad..65c8e1986 100644
--- a/lib/Db/Document.php
+++ b/lib/Db/Document.php
@@ -42,7 +42,7 @@ class Document extends Entity implements \JsonSerializable {
$this->addType('initialVersion', 'integer');
}
- public function jsonSerialize() {
+ public function jsonSerialize(): array {
return [
'id' => $this->id,
'currentVersion' => $this->currentVersion,
diff --git a/lib/Db/Session.php b/lib/Db/Session.php
index 3dc775ed7..34d518aed 100644
--- a/lib/Db/Session.php
+++ b/lib/Db/Session.php
@@ -47,7 +47,7 @@ class Session extends Entity implements \JsonSerializable {
$this->addType('lastContact', 'integer');
}
- public function jsonSerialize() {
+ public function jsonSerialize(): array {
return [
'id' => $this->id,
'userId' => $this->userId,
diff --git a/lib/Db/Step.php b/lib/Db/Step.php
index efc1676fb..fec0537bd 100644
--- a/lib/Db/Step.php
+++ b/lib/Db/Step.php
@@ -39,10 +39,7 @@ class Step extends Entity implements \JsonSerializable {
$this->addType('sessionId', 'integer');
}
- /**
- * @return array|mixed
- */
- public function jsonSerialize() {
+ public function jsonSerialize(): array {
$jsonData = \json_decode($this->data, false);
if (\json_last_error() !== JSON_ERROR_NONE) {
throw new \InvalidArgumentException('Failed to parse step data');