diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2024-11-08 14:44:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-08 14:44:54 +0100 |
commit | 78cf3129aa535502f2baea49944e11221a2acf5c (patch) | |
tree | 94dbcfc44bd0fbe826f3ff24355d50bc17d44ec0 /lib | |
parent | d5caf9125d6af1be077fee49e051a73d46a88975 (diff) | |
parent | 298948c28ce2d01446e718f6cf96e8fe0a444c6c (diff) | |
download | nextcloud-server-78cf3129aa535502f2baea49944e11221a2acf5c.tar.gz nextcloud-server-78cf3129aa535502f2baea49944e11221a2acf5c.zip |
Merge pull request #49145 from nextcloud/ci/noid/php-8.4
feat(PHP): Allow PHP 8.4
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Log/ExceptionSerializer.php | 5 | ||||
-rw-r--r-- | lib/private/legacy/OC_Util.php | 7 | ||||
-rw-r--r-- | lib/versioncheck.php | 6 |
3 files changed, 13 insertions, 5 deletions
diff --git a/lib/private/Log/ExceptionSerializer.php b/lib/private/Log/ExceptionSerializer.php index 904107f6998..6d94bf51f45 100644 --- a/lib/private/Log/ExceptionSerializer.php +++ b/lib/private/Log/ExceptionSerializer.php @@ -34,6 +34,7 @@ class ExceptionSerializer { 'validateUserPass', 'loginWithToken', '{closure}', + '{closure:*', 'createSessionToken', // Provisioning @@ -200,7 +201,9 @@ class ExceptionSerializer { return $this->editTrace($sensitiveValues, $traceLine); } foreach (self::methodsWithSensitiveParameters as $sensitiveMethod) { - if (str_contains($traceLine['function'], $sensitiveMethod)) { + if (str_contains($traceLine['function'], $sensitiveMethod) + || (str_ends_with($sensitiveMethod, '*') + && str_starts_with($traceLine['function'], substr($sensitiveMethod, 0, -1)))) { return $this->editTrace($sensitiveValues, $traceLine); } } diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index 7b41f797e32..f82082d3d12 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -878,7 +878,12 @@ class OC_Util { * @return bool */ public static function isAnnotationsWorking() { - $reflection = new \ReflectionMethod(__METHOD__); + if (PHP_VERSION_ID >= 80300) { + /** @psalm-suppress UndefinedMethod */ + $reflection = \ReflectionMethod::createFromMethodName(__METHOD__); + } else { + $reflection = new \ReflectionMethod(__METHOD__); + } $docs = $reflection->getDocComment(); return (is_string($docs) && strlen($docs) > 50); diff --git a/lib/versioncheck.php b/lib/versioncheck.php index 43539468e3b..9e33f584a9a 100644 --- a/lib/versioncheck.php +++ b/lib/versioncheck.php @@ -13,10 +13,10 @@ if (PHP_VERSION_ID < 80100) { exit(1); } -// Show warning if >= PHP 8.4 is used as Nextcloud is not compatible with >= PHP 8.4 for now -if (PHP_VERSION_ID >= 80400) { +// Show warning if >= PHP 8.5 is used as Nextcloud is not compatible with >= PHP 8.5 for now +if (PHP_VERSION_ID >= 80500) { http_response_code(500); - echo 'This version of Nextcloud is not compatible with PHP>=8.4.<br/>'; + echo 'This version of Nextcloud is not compatible with PHP>=8.5.<br/>'; echo 'You are currently running ' . PHP_VERSION . '.'; exit(1); } |