From 14890fdfa890798659a668c11d56a956f6db602d Mon Sep 17 00:00:00 2001 From: Trevor Fitzgerald Date: Fri, 8 Mar 2019 16:31:05 -0500 Subject: [PATCH] Update Composer checks to work with Laravel 5.8 --- src/Composer.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Composer.php b/src/Composer.php index b477c36..ff5c0dd 100644 --- a/src/Composer.php +++ b/src/Composer.php @@ -6,9 +6,20 @@ class Composer extends \Illuminate\Support\Composer { public function installDryRun(string $options = null) { - $process = $this->getProcess(); + $composer = $this->findComposer(); - $process->setCommandLine(trim($this->findComposer().' install --dry-run '.$options)); + $command = array_merge( + (array) $composer, + ['install', '--dry-run'], + array_filter(array_map('trim', explode(' ', $options))) + ); + + if (is_array($composer)) { + $process = $this->getProcess($command); + } else { + $process = $this->getProcess(); + $process->setCommandLine(trim(implode(' ', $command))); + } $process->run();