From b2c6634fd64b78f3c66d1ddd68344519054cc2eb Mon Sep 17 00:00:00 2001 From: Ayesh Karunaratne Date: Thu, 26 May 2022 09:12:55 +0530 Subject: [PATCH] [PHP 8.2] Fix deprecated `${var}` string interpolation patterns (#5154) PHP 8.2 deprecates string interpolation patterns that place the dollar sign outside the curly braces. This fixes such patterns by replacing them with proper curly braced patterns. Fix: `Drush\Psysh\DrushHelpCommand::execute()` Reference: - [PHP.Watch: `${var}` string interpolation deprecated](https://php.watch/versions/8.2/$%7Bvar%7D-string-interpolation-deprecated) - [wiki.php.net RFC](https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation) --- src/Psysh/DrushHelpCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Psysh/DrushHelpCommand.php b/src/Psysh/DrushHelpCommand.php index 8510daff02..2dc93af1ee 100644 --- a/src/Psysh/DrushHelpCommand.php +++ b/src/Psysh/DrushHelpCommand.php @@ -108,7 +108,7 @@ protected function execute(InputInterface $input, OutputInterface $output): void $namespaces[$namespace] = []; } - $namespaces[$namespace][] = sprintf(" %-${width}s %s%s", $name, $command->getDescription(), $aliases); + $namespaces[$namespace][] = sprintf(" %-{$width}s %s%s", $name, $command->getDescription(), $aliases); } $messages = [];