Skip to content

Commit a322637

Browse files
committed
[PHP 8.2] Fix ${var} string interpolation deprecation
PHP 8.2 deprecates `"${var}"` string interpolation pattern. This fixes all three of such occurrences in `wp-cli/php-cli-tools` package. - [PHP 8.2: `${var}` string interpolation deprecated](https://php.watch/versions/8.2/${var}-string-interpolation-deprecated) - [RFC](https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation)
1 parent a286685 commit a322637

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/menu.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
break;
2020
}
2121

22-
include "${choice}.php";
22+
include "{$choice}.php";
2323
\cli\line();
2424
}

lib/cli/arguments/HelpScreen.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private function _renderScreen($options, $max) {
9191

9292
$pad = str_repeat(' ', $max + 3);
9393
while ($desc = array_shift($description)) {
94-
$formatted .= "\n${pad}${desc}";
94+
$formatted .= "\n{$pad}{$desc}";
9595
}
9696

9797
array_push($help, $formatted);

0 commit comments

Comments
 (0)