• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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

Kulturmensch

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