Update 26.0.0 to 26.0.1 to 26.0.2 delivers (again) "Using ${var} in strings is deprecated, use {$var} instead.... /3rdparty/scssphp/scssphp/src/Compiler.php#3491"

The error

Fehler PHP Using ${var} in strings is deprecated, use {$var} instead at /var/www/nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php#3491

flooded again the logs after Update from NC 26.0.0 to 26.0.1 because the scsphp coming with original 26.0.1 files is still 1.8.x instead of 1.11.1

This issue is closed on github with hint to 1.11.1

Is it a mistake that the 3rdparty folder scsphp still contains the old version?
After changing scsphp 1.8.x to the src files from github (here: https://github.com/scssphp/scssphp/releases/tag/v1.11.0) the errors in log are gone.

Thanks for light up this :slightly_smiling_face:

If someone see the folling error in logfiles

Fehler index Exception: Class "ScssPhp\ScssPhp\Block\DirectiveBlock" not found in file '/var/www/nextcloud/3rdparty/scssphp/scssphp/src/Parser.php' line 855

that affects the missing

GET /apps/theming/theme/opendyslexic.css?plain=

I can get rid of those messages by symlinking my default.css to this place.
So i mkdir /var/www/nextcloud/apps/theming/theme
make it owned by www-data by

chown -R www-data:www-data /var/www/nextcloud/apps/theming/theme

Then symlinking

ln -s /var/www/nextcloud/apps/theming/css/default.css /var/www/nextcloud/apps/theming/theme/opendyslexic.css

After that the errors 855 are gone so far.

a little bit frustrated i see that the errors

[PHP] Fehler: Using ${var} in strings is deprecated, use {$var} instead at /var/www/nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php#3491

GET /apps/theming/theme/light.css?plain=0&v=b6692ea5
from LOCAL-IP at 2023-05-28T08:37:28+02:00

are back in the original files of the update to NC 26.0.2

The line 3491 of …/src/Compiler.php says

if (
\is_callable([$this, $fn]) ||
(($fn = “op${ucLType}${ucRType}”) &&
\is_callable([$this, $fn]) &&
$passOp = true) ||
(($fn = “op${ucOpName}”) &&
\is_callable([$this, $fn]) &&
$genOp = true)

like the solution on github mentioned

Shouldn’t lines 3491 ff be like this?

if (
\is_callable([$this, $fn]) ||
(($fn = “op{$ucLType}{$ucRType}”) &&
\is_callable([$this, $fn]) &&
$passOp = true) ||
(($fn = “op{$ucOpName}”) &&
\is_callable([$this, $fn]) &&
$genOp = true)

My System is ubuntu 22.04.2, PHP 8.2.6
I still have the …/3rdparty/scssphp/scssphp/src folder of the 26.0.1 in my updater_xxxxx/backups folder.
The error “…Using ${var} in strings is deprecated, use {$var} instead…” leads me to the to this

They’re not “back” - this change is in NC27. It hasn’t been backported to NC26.

These aren’t errors - they’re warnings for developers. I don’t believe they even show up unless you have your NC log level set to debug.

Thanks for reply, i’ve checked my NC config and found

'loglevel' => 3,

And it seems to be more than a warning. In my logs it is accounted as “Fehler” (means: Error) - in this case concerning PHP.

Never the less i must have overlooked the info that this fix will not be backported to the 26.0.x line.

So i will have to fix it in upcoming 26.0.3+ updates as well until it is worth to change to 27.0.x line.

I think keeping logfiles small / empty of warnings/errors/failures is the purpose, so if someone out there is getting those “errors” and the the change make you get rid of the logmessages - fell free to try the fix :slight_smile:

I ran into this too after updating to NC v26.0.2.1 yesterday (more than 3 months after initial series 26 release).

Fehler	PHP	Using ${var} in strings is deprecated, use {$var} instead at /var/www/nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php#3491	
vor 10 Minuten
Fehler	PHP	Using ${var} in strings is deprecated, use {$var} instead at /var/www/nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php#3491	
vor 10 Minuten
Fehler	PHP	Using ${var} in strings is deprecated, use {$var} instead at /var/www/nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php#3491	
vor 10 Minuten
Fehler	PHP	Using ${var} in strings is deprecated, use {$var} instead at /var/www/nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php#3491	
vor 10 Minuten
Fehler	PHP	Using ${var} in strings is deprecated, use {$var} instead at /var/www/nextcloud/3rdparty/scssphp/scssphp/src/Compiler.php#3491	
vor 10 Minuten

I don’t see an easy hotfix for this (like “edit lines X, Y and Z in file abc.xyz” - the 41 changed files in Bump scssphp/scssphp to 1.11 in master by come-nc · Pull Request #1357 · nextcloud/3rdparty · GitHub are not an option obviously) and will probably live with that until NC v27 is stable enough to update (so probably another 2 to 3 months, argh).

TBH it’s a bit frustrating that even waiting for such a long time and choosing a .0.2.1 point release for the first major release update is still no guarantee (no one ever told there is one for FOSS) for not running into issues.

Off-topic: Meanwhile it very often feels like bringing out new major releases in much shorter time with a lot of release announcements has priority over stability - just look at all the apps which simply can’t catch up with the new major release cycles and lack support for new major releases even months after release. So hacking the appinfo.php is one of the most important (and a bit risky) things one should be aware of trying to stay some kind of up to date. Rant over.

In this specific case I don’t get if there’s an actual negative outcome or it’s “just” the log spamming.

v27 seems not to be the solution so far …

But the v27 has just started so i will wait for 27.0.1 or 27.0.2 …maybe we are a bit further then.

Fixed according to [Bug]: Error: Using ${var} in strings is deprecated (fixed on v27, not on v26) · Issue #37362 · nextcloud/server · GitHub (NC v27+ only!).