From 7efdf967751070e2600b322b3758203352a94757 Mon Sep 17 00:00:00 2001 From: davemednick <93415315+davemednick@users.noreply.github.com> Date: Thu, 18 Jul 2024 12:35:55 -0400 Subject: [PATCH 1/8] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9edff17..c477fbc 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "php": "^7.1|^8.0", "ext-simplexml": "*", "symfony/console": "^2.5|^3|^4|^5|^6", - "symfony/process": "^2.5|^3|^4|^5|^6" + "symfony/process": "^2.5|^3|^4|^5|^6|^7" }, "require-dev": { "symfony/console": "2.8.*" From 5738dcd3eefa8b377da04da8bee03d12dffa1318 Mon Sep 17 00:00:00 2001 From: davemednick <93415315+davemednick@users.noreply.github.com> Date: Thu, 18 Jul 2024 12:36:46 -0400 Subject: [PATCH 2/8] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c477fbc..caf8293 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "require": { "php": "^7.1|^8.0", "ext-simplexml": "*", - "symfony/console": "^2.5|^3|^4|^5|^6", + "symfony/console": "^2.5|^3|^4|^5|^6|^7", "symfony/process": "^2.5|^3|^4|^5|^6|^7" }, "require-dev": { From cc75365a97f9272abcca723d61df152f8dd3cf78 Mon Sep 17 00:00:00 2001 From: davemednick <93415315+davemednick@users.noreply.github.com> Date: Thu, 18 Jul 2024 12:40:17 -0400 Subject: [PATCH 3/8] Process accepts array not string --- src/DumpCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DumpCommand.php b/src/DumpCommand.php index d15ca46..9ecee00 100644 --- a/src/DumpCommand.php +++ b/src/DumpCommand.php @@ -86,7 +86,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $process = Process::fromShellCommandline($command); } else { // old Symfony way - $process = new Process($command); + $process = new Process([$command]); } $process->run(); if (!$process->isSuccessful()) { From 9661a362137b38435cb1931fe558ebb4599c3118 Mon Sep 17 00:00:00 2001 From: davemednick <93415315+davemednick@users.noreply.github.com> Date: Thu, 18 Jul 2024 12:51:26 -0400 Subject: [PATCH 4/8] explode command --- src/DumpCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DumpCommand.php b/src/DumpCommand.php index 9ecee00..1ddd47e 100644 --- a/src/DumpCommand.php +++ b/src/DumpCommand.php @@ -81,12 +81,13 @@ protected function execute(InputInterface $input, OutputInterface $output): int // find all commands $command = $script . ' list ' . $scriptOptions . ' --format=xml'; + $command_exploded = [$script . ' list ' . $scriptOptions, '--format=xml']; if (method_exists(Process::class, 'fromShellCommandline')) { // Symfony 4+ $process = Process::fromShellCommandline($command); } else { // old Symfony way - $process = new Process([$command]); + $process = new Process($command_exploded); } $process->run(); if (!$process->isSuccessful()) { From 43f52c058c170d7abf4871a9fd97635a9b02a26e Mon Sep 17 00:00:00 2001 From: davemednick <93415315+davemednick@users.noreply.github.com> Date: Thu, 18 Jul 2024 13:01:32 -0400 Subject: [PATCH 5/8] new Process accepts array, old Process accepts string --- src/DumpCommand.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/DumpCommand.php b/src/DumpCommand.php index 1ddd47e..15ea8fb 100644 --- a/src/DumpCommand.php +++ b/src/DumpCommand.php @@ -81,13 +81,18 @@ protected function execute(InputInterface $input, OutputInterface $output): int // find all commands $command = $script . ' list ' . $scriptOptions . ' --format=xml'; - $command_exploded = [$script . ' list ' . $scriptOptions, '--format=xml']; + $script_options_exploded = explode(' ', $scriptOptions); + $command_exploded[0] = $script . ' list'; + foreach($script_options_exploded as $option) { + $command_exploded[] = $option; + } + $command_exploded[] = '--format=xml'; if (method_exists(Process::class, 'fromShellCommandline')) { // Symfony 4+ - $process = Process::fromShellCommandline($command); + $process = Process::fromShellCommandline($command_exploded); } else { // old Symfony way - $process = new Process($command_exploded); + $process = new Process($command); } $process->run(); if (!$process->isSuccessful()) { From 65db81b96d67d5cbf6f9458fb1f61f00726d2306 Mon Sep 17 00:00:00 2001 From: davemednick <93415315+davemednick@users.noreply.github.com> Date: Thu, 18 Jul 2024 13:03:01 -0400 Subject: [PATCH 6/8] add replace --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index caf8293..90227c2 100644 --- a/composer.json +++ b/composer.json @@ -11,6 +11,9 @@ "require-dev": { "symfony/console": "2.8.*" }, + "replace": { + "bamarni/symfony-console-autocomplete": "*" + }, "authors": [ { "name": "Bilal Amarni", From 206b5e7c286fbae09c311b7872f3ffa05021d864 Mon Sep 17 00:00:00 2001 From: davemednick <93415315+davemednick@users.noreply.github.com> Date: Thu, 18 Jul 2024 13:08:16 -0400 Subject: [PATCH 7/8] array --- src/DumpCommand.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/DumpCommand.php b/src/DumpCommand.php index 15ea8fb..69e5764 100644 --- a/src/DumpCommand.php +++ b/src/DumpCommand.php @@ -81,18 +81,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int // find all commands $command = $script . ' list ' . $scriptOptions . ' --format=xml'; - $script_options_exploded = explode(' ', $scriptOptions); - $command_exploded[0] = $script . ' list'; - foreach($script_options_exploded as $option) { - $command_exploded[] = $option; - } - $command_exploded[] = '--format=xml'; if (method_exists(Process::class, 'fromShellCommandline')) { // Symfony 4+ - $process = Process::fromShellCommandline($command_exploded); + $process = Process::fromShellCommandline($command); } else { // old Symfony way - $process = new Process($command); + $process = new Process(explode(' ', $command)); } $process->run(); if (!$process->isSuccessful()) { From d227526de6fbd05fb5124c5eb2528bdf08192e6d Mon Sep 17 00:00:00 2001 From: davemednick <93415315+davemednick@users.noreply.github.com> Date: Tue, 23 Jul 2024 07:52:31 -0400 Subject: [PATCH 8/8] remove replace needed for fork --- composer.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/composer.json b/composer.json index 90227c2..caf8293 100644 --- a/composer.json +++ b/composer.json @@ -11,9 +11,6 @@ "require-dev": { "symfony/console": "2.8.*" }, - "replace": { - "bamarni/symfony-console-autocomplete": "*" - }, "authors": [ { "name": "Bilal Amarni",