Skip to content

Commit b86375a

Browse files
committed
Fix php 8.3 deprecations
1 parent 26609e0 commit b86375a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Commands/AutocompleteCommand.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public function install()
3131
$terminus_autocomplete = getenv('HOME') . '/.terminus-autocomplete';
3232
if (!file_exists($terminus_autocomplete)) {
3333
$message = "To complete the installation, paste in the terminal the following:" . PHP_EOL;
34-
$message .= PHP_EOL . "echo 'source ${prefix}/etc/bash_completion' >> ~/${bashrc}" . PHP_EOL;
35-
$message .= "echo 'source ${terminus_autocomplete}' >> ~/${bashrc}" . PHP_EOL;
34+
$message .= PHP_EOL . "echo 'source {$prefix}/etc/bash_completion' >> ~/{$bashrc}" . PHP_EOL;
35+
$message .= "echo 'source ${terminus_autocomplete}' >> ~/{$bashrc}" . PHP_EOL;
3636
$this->log()->notice($message);
3737
$this->update($force = true);
3838
}
@@ -101,7 +101,7 @@ public function update($force = false)
101101
$this->pantheon_site_environments();
102102
$bashrc = (TERMINUS_OS == 'DAR') ? '.bash_profile' : '.bashrc';
103103
$message = "To complete the update, execute the following:" . PHP_EOL;
104-
$message .= PHP_EOL . "source ~/${bashrc}" . PHP_EOL;
104+
$message .= PHP_EOL . "source ~/{$bashrc}" . PHP_EOL;
105105
$this->log()->notice($message);
106106
$this->test();
107107
}
@@ -141,11 +141,11 @@ protected function pantheon_site_environments()
141141
$sites = shell_exec("drush sa | grep @pantheon. | sed -e \"s/'//g\" | sed -e \"s/://g\" | cut -d'.' -f2,3 | xargs");
142142
$terminus_autocomplete = getenv('HOME') . '/.terminus-autocomplete';
143143
$lines = file($terminus_autocomplete, FILE_IGNORE_NEW_LINES);
144-
$line = shell_exec("grep -n '^}' ${terminus_autocomplete} | cut -d':' -f1");
144+
$line = shell_exec("grep -n '^}' {$terminus_autocomplete} | cut -d':' -f1");
145145
$line = trim(preg_replace('/[\n|\r]/', '', $line)) - 1;
146146
$lines[$line] = " prev=\${COMP_WORDS[COMP_CWORD-1]}";
147147
$lines[$line + 1] = " if [[ \$prev == \"drush\" ]]; then";
148-
$lines[$line + 2] = " sites=\"${sites}\"";
148+
$lines[$line + 2] = " sites=\"{$sites}\"";
149149
$lines[$line + 3] = " COMPREPLY=(\$(compgen -W \"\${sites}\" -- \${cur}))";
150150
$lines[$line + 4] = " return 0";
151151
$lines[$line + 5] = " fi";
@@ -203,7 +203,7 @@ protected function checkRequirements()
203203
$prefix = shell_exec("brew --prefix");
204204
$prefix = trim(preg_replace('/[\n|\r]/', '', $prefix));
205205
}
206-
$bash_completion = "${prefix}/etc/bash_completion";
206+
$bash_completion = "{$prefix}/etc/bash_completion";
207207
if (!file_exists("$bash_completion")) {
208208
$message = "Please install bash-completion to continue." . PHP_EOL;
209209
$message .= " MacOS: brew install bash-completion" . PHP_EOL;

0 commit comments

Comments
 (0)