Skip to content

Commit

Permalink
Merge pull request #76 from fitztrev/patch-3
Browse files Browse the repository at this point in the history
Update Composer checks to work with Laravel 5.8
  • Loading branch information
mpociot authored Mar 20, 2019
2 parents 57d8707 + 14890fd commit 0d9a06d
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/Composer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 0d9a06d

Please sign in to comment.