PHP 8.1 compatibility fixes

This commit is contained in:
ByteHamster 2022-01-01 13:21:47 +01:00
parent b0fff14c5a
commit ec6825374b
5 changed files with 4 additions and 6 deletions

View file

@ -15,8 +15,6 @@ jobs:
php-versions: ['7.2', '7.3', '7.4', '8.0']
cs-fixer: [ true ]
include:
- php-versions: '7.1'
cs-fixer: false
- php-versions: '8.1'
cs-fixer: false
steps:

View file

@ -63,7 +63,6 @@ class AddressBooks extends \Flake\Core\Controller {
$aAddressBooks = [];
$oAddressBooks = $this->oUser->getAddressBooksBaseRequester()->execute();
reset($oAddressBooks);
foreach ($oAddressBooks as $addressbook) {
$aAddressBooks[] = [
"linkedit" => $this->linkEdit($addressbook),

View file

@ -61,7 +61,6 @@ class Users extends \Flake\Core\Controller {
$aUsers = [];
$oUsers = \Baikal\Model\User::getBaseRequester()->execute();
reset($oUsers);
foreach ($oUsers as $user) {
$aUsers[] = [
"linkcalendars" => \BaikalAdmin\Controller\Users::linkCalendars($user),

View file

@ -31,10 +31,12 @@ class Collection extends \Flake\Core\FLObject implements \Iterator {
protected $aCollection = [];
protected $aMeta = [];
#[\ReturnTypeWillChange]
function current() {
return current($this->aCollection);
}
#[\ReturnTypeWillChange]
function key() {
return key($this->aCollection);
}

View file

@ -13,9 +13,9 @@
}
],
"require": {
"php" : "^7.1 || ^8.0",
"php" : "^7.2 || ^8.0",
"sabre/dav" : "~4.3.0",
"twig/twig" : "~2.13.1",
"twig/twig" : "~2.14.8",
"symfony/yaml" : "^3.4"
},
"require-dev" : {