- Issue created by @peter pulsifer
- Status changed to Needs review
about 1 year ago 7:46pm 12 December 2023 - Status changed to Fixed
5 months ago 4:40am 13 July 2024 - Status changed to Fixed
5 months ago 5:52am 13 July 2024
I received the following warning message when loading the manage display screen for a taxonomy term (D10):
Deprecated function: Using ${var} in strings is deprecated, use {$var} instead in include() (line 571 of vendor/composer/ClassLoader.php).
The cause was not in ClassLoader.php but in the include $file, and the culprit turned out to be
.../modules/formatter_suite/src/Plugin/Field/FieldFormatter/GeneralNumberWithBarIndicatorFormatter.php
where line 455 is
$backgroundStyle = "width: ${barLength}px; height: ${barWidth}px;";
Simple fix: change line 455 to the now-preferred syntax by moving the curly brackets:
$backgroundStyle = "width: {$barLength}px; height: {$barWidth}px;";
The new form should be compatible with previous and future php versions.
(I thought I had seen a reference to this elsewhere, but can't find it now.)
Fixed
2.0
Code