beyondcode / laravel-self-diagnosis

Perform Self-Diagnosis Tests On Your Laravel Application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Composer::installDryRun() calling getProcess without argument

kbond opened this issue · comments

Too few arguments to function Illuminate\Support\Composer::getProcess(), 0 passed in /vendor/beyondcode/laravel-self-diagnosis/src/Composer.php on line 9 and exactly 1 expected

Looks like Laravel 5.8 changed Illuminate\Support\Composer::getProcess() to have a required array $command argument.

Also ran into this issue, fixed it temporarily using the following code. Not sure if it's compatible with Laravel 5.7 and lower.

$process = $this->getProcess([]);

$process->setCommandLine(trim(implode(' ', $this->findComposer()).' install --dry-run '.$options));

It is but Process::setCommandLine() is deprecated in Symfony 4.2. There is a static constructor for process: Process::fromShellCommandline() that accepts a string as the command but it is only available in Symfony 4.2+.

Having this issue too. It affects these 2 checks, so I've disabled them for now:

ComposerWithDevDependenciesIsUpToDate
ComposerWithoutDevDependenciesIsUpToDate