Use php 8.0 for nextcloud 22
This commit is contained in:
parent
aed2f2db38
commit
cb8cf250a5
@ -18,7 +18,7 @@
|
||||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "7.4"
|
||||
"php": "8.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
4
composer.lock
generated
4
composer.lock
generated
@ -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": "5c7be477b217d6074abc6c2f8d2c2256",
|
||||
"content-hash": "7b806afecf0b4bd9cf2aed44f533eaf4",
|
||||
"packages": [],
|
||||
"packages-dev": [
|
||||
{
|
||||
@ -389,7 +389,7 @@
|
||||
"platform": [],
|
||||
"platform-dev": [],
|
||||
"platform-overrides": {
|
||||
"php": "7.4"
|
||||
"php": "8.0"
|
||||
},
|
||||
"plugin-api-version": "2.3.0"
|
||||
}
|
||||
|
@ -167,10 +167,7 @@ class PageController extends Controller {
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $value
|
||||
*/
|
||||
private function toJson($value): string {
|
||||
private function toJson(array $value): string {
|
||||
return htmlspecialchars(json_encode($value), ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ abstract class ReaderEntity extends Entity {
|
||||
*
|
||||
* @return string|array
|
||||
*/
|
||||
public function conditional_json_decode(string $el) {
|
||||
public function conditional_json_decode(string $el): mixed {
|
||||
/** @var array $result */
|
||||
$result = json_decode($el);
|
||||
if (json_last_error() === JSON_ERROR_NONE) {
|
||||
|
@ -79,10 +79,7 @@ class Hooks {
|
||||
$queryBuilder->executeStatement();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $string
|
||||
*/
|
||||
private static function isJson($string): bool {
|
||||
private static function isJson(mixed $string): bool {
|
||||
return is_string($string) && is_array(json_decode($string, true)) && json_last_error() == JSON_ERROR_NONE;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user