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: Release 1.11.0 · scssphp/scssphp · GitHub) 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: