Remove PHP8.2 Deprecation

Created on 5 May 2023, about 1 year ago
Updated 8 May 2023, about 1 year ago

${} string interpolations are deprecated since PHP8.2, see: https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation

Config Patch uses Option 3 (see link above) in the PluginManager class for config_patch output. When I load the backend with PHP8.2, I'll get a message pointing to the deprecation right away:

Deprecated function: Using ${var} in strings is deprecated, use {$var} instead in include() (line 582 of /app/vendor/composer/ClassLoader.php).
include('/app/web/core/includes/bootstrap.inc') (Line: 582)
Composer\Autoload\{closure}('/app/web/modules/contrib/config_patch/src/PluginManager.php') (Line: 433)
Composer\Autoload\ClassLoader->loadClass('Drupal\config_patch\PluginManager') (Line: 259)

To be more future proof, the module should completely remove string interpolations and use another way, e.g. sprintf().

✨ Feature request
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany matzAB

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024