• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

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