PHP 8.4
just now PHP 8.4 has arrived in master of Nextcloud Server (external storage support is missing but coming soon, ref PHP 8.4 external storages support by nickvergessen · Pull Request #49151 · nextcloud/server · GitHub ).
Feel free to start testing your app already for compatibility.
Testing on CI
If you use the workflows from our organisation repository, that will happen out of the box as they read the lib/versioncheck.php from server:
If not, you can manually adjust your workflows or migrate to those templated workflow templates for named repository.
Common things to look out for
The most known code adjustment that is needed is the following error:
Implicitly marking parameter $var as nullable is deprecated, the explicit nullable type must be used instead
This happens for primitives as well as classes. The fix is quite simple, see this 3rdparty PR as an example:
Other things I noticed:
- Closures changed their “textual representation” (no longer
{closure}
, but{closure:location:linenumber}
e.g.{closure:Test\\LoggerTest::testDetectclosure():294}
) - ReflectionMethod calls needs adjusting:
https://github.com/nextcloud/server/pull/49145/files#diff-563a271db252d8d58d5d4005a35649b18accebb13b935524fb3453e89eeb15dd
Happy testing