Skip to content

Commit

Permalink
Fix Symfony Console PHP 8.2 deprecation warnings (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlocati authored Jun 10, 2022
1 parent 6f3874f commit 93d76e0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
},
"hoa/stream:1.17.02.21": {
"PHP 8 fixes": "patches/hoa/stream/0001-Fix-PHP-8-compatibility.patch"
},
"symfony/console:5.4.1": {
"PHP 8.2 fixes": "patches/symfony/console/0001-Fix-PHP-8.2-compatibility.patch"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions patches/symfony/console/0001-Fix-PHP-8.2-compatibility.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From: Michele Locati <[email protected]>
Date: Fri, 10 Jun 2022 17:06:32 +0200
Subject: [PATCH] Fix PHP 8.2 deprecation warning about strings interpolation

--- a/Command/DumpCompletionCommand.php
+++ b/Command/DumpCompletionCommand.php
@@ -53,7 +53,7 @@ to use shell autocompletion (currently only bash completion is supported).

Dump the script to a global completion file and restart your shell:

- <info>%command.full_name% bash | sudo tee /etc/bash_completion.d/${commandName}</>
+ <info>%command.full_name% bash | sudo tee /etc/bash_completion.d/{$commandName}</>

Or dump the script to a local file and source it:

@@ -70,7 +70,7 @@ Or dump the script to a local file and source it:

Add this add the end of your shell configuration file (e.g. <info>"~/.bashrc"</>):

- <info>eval "$(${fullCommand} completion bash)"</>
+ <info>eval "$({$fullCommand} completion bash)"</>
EOH
)
->addArgument('shell', InputArgument::OPTIONAL, 'The shell type (e.g. "bash"), the value of the "$SHELL" env var will be used if this is not given')

0 comments on commit 93d76e0

Please sign in to comment.