Php deprecation and app issues after upgrade to 26

Not sure if this is the best place, but here it goes…
…installed a bunch of apps under NC26 despite them officially not being listed as compatible, and also some that claim to be compatible.
Yet, I get these error messages, because I guess even some compatible apps haven’t been updated to the latest php versions:

PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/nextcloud/apps/mail/vendor/voku/portable-utf8/src/voku/helper/UTF8.php on line 4653
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/nextcloud/apps/mail/vendor/voku/portable-utf8/src/voku/helper/UTF8.php on line 4664
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/nextcloud/apps/mail/vendor/voku/portable-utf8/src/voku/helper/UTF8.php on line 5731
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/nextcloud/apps/mail/vendor/voku/portable-utf8/src/voku/helper/UTF8.php on line 5742
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/nextcloud/apps/mail/vendor/voku/portable-utf8/src/voku/helper/UTF8.php on line 13398
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/nextcloud/apps/mail/vendor/voku/portable-utf8/src/voku/helper/UTF8.php on line 13398
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/nextcloud/apps/mail/vendor/voku/portable-utf8/src/voku/helper/UTF8.php on line 13409
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/nextcloud/apps/mail/vendor/voku/portable-utf8/src/voku/helper/UTF8.php on line 13409
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/nextcloud/apps/groupfolders/lib/Command/ExpireGroup/ExpireGroupVersions.php on line 54
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/nextcloud/apps/groupfolders/lib/Command/Scan.php on line 86
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/nextcloud/apps/notify_push/lib/SetupWizard.php on line 247
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php on line 235
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/nextcloud/apps/previewgenerator/lib/Command/PreGenerate.php on line 204
PHP Deprecated: Optional parameter $userId declared before required parameter $filter is implicitly treated as a required parameter in /var/www/nextcloud/apps/sharelisting/lib/Service/SharesList.php on line 193
PHP Deprecated: Using ${expr} (variable variables) in strings is deprecated, use {${expr}} instead in /var/www/nextcloud/apps/user_migration/lib/Service/UserMigrationService.php on line 235
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/nextcloud/apps/user_migration/lib/Command/Import.php on line 91
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/nextcloud/apps/user_migration/lib/Command/Import.php on line 94

Is there a way to silence these messages, because they make working with occ rather cumbersome…

1 Like

Hi @rcfa,
You are missing the required support template. Please fill this form out and edit into your post.

This will give us the technical info and logs needed to help you! Thanks.

1 Like

You’re getting the deprecated messages because you’re using >= PHP 8.2:

https://php.watch/versions/8.2/${var}-string-interpolation-deprecated

The deprecated messages are purely cosmetic (for what that’s worth) and they aren’t related to NC v26 compatibility/incompatibility.

You likely wouldn’t be seeing them if you stick with the PHP release which is recommended in the v26 docs (v8.1):

https://docs.nextcloud.com/server/stable/admin_manual/installation/system_requirements.html

You might be able to get rid of the deprecated messages by editing your various php.ini files (cli, fpm, apache, etc.). The occ command should only need the change to the cli php.ini.

I’m not sure what to tell you about the apps listed as not being compatible - there’s a reason they’re still listed that way! :slight_smile:

I understand what you wrote. I also wasn’t complaining about the non-NC26 compatible apps, I enabled them on my own risk. I was just mentioning that the messages are not restricted to apps that are officially not yet classified as compatible, but also are generated by NC26 compatible apps.

Thing is, this is running on a Kali installation, and php8.2 is the current php version on that system. Downgrading that would have other undesirable effects, aside from the fact that the claim was that NC26 is php8.2 compatible, which is why I started using NC26 beta rather than ever installing NC25.

Interestingly, however, these messages are only visible since the final NC26 release, I did not see them during the beta cycle, which is why I’m asking if there’s a way to silence the messages.

Even though NC seems to work fine (at least as far as I currently can tell), it’s a nuissance if each occ command is accompanied by a slew of these messages.

I considered editing the offending files, but since apps are regularly updated, I would have to keep editing, plus I’d get additional errors from the code signing side, as of course the file checksums would no longer be correct after any edits.

Okay fair enough.

My assessment is that v8.2 support is there, but v8.1 is still recommended best practice (and what’s indicated in the official documentation).

Anyhow, there’s a fix pending:

I assume you mean by adding/changing the error_reporting setting to:

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

but that didn’t help. Not even putting a

error_reporting(E_ALL & ~E_DEPRECATED);

line into /var/www/nextcloud/config/config.php made a difference.

Maybe some of the sources explicitly set error reporting locally, which really shouldn’t be the case other during internal development/debugging?

See