• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

Resolved PHP 8.2 - Deprecated function: Using ${var}

Jürgen_T

Regular Pleskian
Since I upgraded from php 8.1 to php 8.2 I got some deprecation warnings like "Deprecated function: Using ${var} in strings is deprecated, use {$var} instead" In some cases I could solve it by replacing used variables i.e. ${var} by ${var}.

But I have no idea how to solve this following warning by Drupal 10:

Deprecated function: Using ${var} in strings is deprecated, use {$var} instead in include() (line 571 of /var/www/vhosts/tenckhoff.de/httpdocs/vendor/composer/ClassLoader.php)

On line 571 I found the following code:

569 function includeFile($file)
570 {
571 include $file;
572 }

Is there any proposal what I can try to get rid of this deprecation warning?
 

or in Plesk set the error reporting level for your PHP scripts from the drop down (or enter your individual setting):

1682930608841.png

However, it is likely that your script sets its own error_reporting() so that will override the general setting of PHP via Plesk. It is best to control error reporting with the error_reporting() function in a script, e.g.
error_reporting(0)
to disable all (on production systems, not recommend on development systems).
 
Hi Peter, thank you for the quick advice - this helped! Now I got rid of the message in the prod. environment and have time to find a general solution for the concerned deprecated files:)
 
Back
Top