Skip to content

Commit

Permalink
Php 8.2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
benyovszky authored and tmuras committed Jan 10, 2025
1 parent f10fdbc commit fc078ac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Moosh/MooshCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/
define('ARG_EXISTING_FILENAME', 1);

#[\AllowDynamicProperties]
class MooshCommand {

/**
Expand Down Expand Up @@ -254,7 +255,7 @@ public function expandOptions() {
if ($v === null) {
$v = '';
}
$expanded = str_replace('%s', $arg, $v);
$expanded = str_replace('%s', (string) $arg, (string) $v);
if ($this->verbose && $v != $expanded) {
echo "'$k' expanded from '$v' to '$expanded'\n";
}
Expand All @@ -277,7 +278,7 @@ public function expandOptionsManually($replacements) {
if ($v === null) {
$v = '';
}
$expanded = str_replace('%s', $arg, $v);
$expanded = str_replace('%s', (string) $arg, (string) $v);
if ($this->verbose && $v != $expanded) {
echo "'$k' manually expanded from '$v' to '$expanded'\n";
}
Expand Down

0 comments on commit fc078ac

Please sign in to comment.