Add PHP8.1 compatibility

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2022-02-25 10:42:41 +01:00
parent 91a863d4b1
commit 4b5156c2ec
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
8 changed files with 14 additions and 6 deletions

View File

@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.2', '7.3', '7.4', '8.0']
php-versions: ['7.3', '7.4', '8.0', '8.1']
name: php${{ matrix.php-versions }} lint
steps:
- name: Checkout

View File

@ -20,6 +20,8 @@ jobs:
nextcloud-versions: 'master'
- php-versions: '8.0'
nextcloud-versions: 'master'
- php-versions: '8.1'
nextcloud-versions: 'master'
name: php${{ matrix.php-versions }} on ${{ matrix.nextcloud-versions }} unit tests
env:
CI: true

View File

@ -32,7 +32,7 @@
<screenshot>https://raw.githubusercontent.com/nextcloud/calendar/main/screenshots/week_room_suggestion.png</screenshot>
<screenshot>https://raw.githubusercontent.com/nextcloud/calendar/main/screenshots/week_sidebar.png</screenshot>
<dependencies>
<php min-version="7.3" max-version="8.0" />
<php min-version="7.3" max-version="8.1" />
<nextcloud min-version="21" max-version="24" />
</dependencies>
<background-jobs>

View File

@ -6,7 +6,7 @@
"sort-packages": true
},
"require": {
"php": "^7.2|^8.0"
"php": ">=7.3 <=8.1"
},
"require-dev": {
"christophwurst/nextcloud_testing": "0.12.4",

6
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "12dfa8a3be938b8be321b00d47c337c2",
"content-hash": "bbde2eca49163a0f4852b85fb25d6040",
"packages": [],
"packages-dev": [
{
@ -4281,11 +4281,11 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": "^7.2|^8.0"
"php": ">=7.3 <=8.1"
},
"platform-dev": [],
"platform-overrides": {
"php": "7.3"
},
"plugin-api-version": "2.1.0"
"plugin-api-version": "2.2.0"
}

View File

@ -28,6 +28,7 @@ namespace OCA\Calendar\Db;
use JsonSerializable;
use OCP\AppFramework\Db\Entity;
use ReturnTypeWillChange;
use function json_decode;
use function json_encode;
@ -183,6 +184,7 @@ class AppointmentConfig extends Entity implements JsonSerializable {
return $this;
}
#[ReturnTypeWillChange]
public function jsonSerialize() {
return [
'id' => $this->id,

View File

@ -28,6 +28,7 @@ namespace OCA\Calendar\Db;
use JsonSerializable;
use OCP\AppFramework\Db\Entity;
use ReturnTypeWillChange;
/**
* @method int getId()
@ -94,6 +95,7 @@ class Booking extends Entity implements JsonSerializable {
$this->addType('confirmed', 'boolean');
}
#[ReturnTypeWillChange]
public function jsonSerialize() {
return [
'id' => $this->getId(),

View File

@ -26,6 +26,7 @@ namespace OCA\Calendar\Service;
use OCA\Calendar\AppInfo\Application;
use OCP\IConfig;
use OCP\IUserSession;
use ReturnTypeWillChange;
class JSDataService implements \JsonSerializable {
@ -50,6 +51,7 @@ class JSDataService implements \JsonSerializable {
/**
* @inheritDoc
*/
#[ReturnTypeWillChange]
public function jsonSerialize() {
$user = $this->userSession->getUser();