Php 8 upgrade creating tons of Required parameter $xxx follows optional parameter $yyy errors in log

After upgrade to php 8, I’ve noticed tons of errors in the log file for this entry

Required parameter $tagManager follows optional parameter $fileIdentifier at /path_to_nc/apps/files/lib/Helper.php#220

Also happening with other files:
Required parameter $internalPath follows optional parameter $mountId at /path_to_nc/nextcloud/lib/private/Files/Config/CachedMountFileInfo.php

Nextcloud version (eg, 20.0.5): 21
Operating system and version (eg, Ubuntu 20.04): Raspbian GNU/Linux 10 (buster)
Apache or nginx version (eg, Apache 2.4.25): nginx/1.14.2
PHP version (eg, 7.4): v8.0.3

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Upgrade to NC 21
  2. Upgrade php to 8
  3. Check logs

I searched online and found this stackoverflow:

I’m not a php coder, but perhaps this presents a clue to the fix.

Same issue here. Because of that error the cron job cannot successfully execute.

I believe it’s been identified and work is being done on it:

1 Like

Good evening. Same issue here, whith the same NC/PHP version. Hopa a fix will be found soon, thanks a lot :slight_smile: