Skip to content
This repository has been archived by the owner on Jul 2, 2022. It is now read-only.

Laravel 7.x: Installation error caused by invalid Process() parameter #37

Open
larsbo opened this issue Jun 4, 2020 · 2 comments
Open

Comments

@larsbo
Copy link

larsbo commented Jun 4, 2020

Describe the bug
The install command fails with a TypeError caused by wrong Process() parameter usage here (it expects an array as first parameter):

$process = new Process($composer.' dump-autoload');

To Reproduce
Steps to reproduce the behavior:

  1. execute php artisan blogged:install in a fresh Laravel 7.x installation.
  2. See error

Expected behavior
The execution of composer dump-autoload.

Screenshots
If applicable, add screenshots to help explain your problem.

The error occures at least with Laravel 7.x because it uses Symfony Process 5.x which requires the array usage as descripted here:
https://symfony.com/doc/5.0/components/process.html#usage

@virenderscideas
Copy link

Error

Argument 1 passed to Symfony\Component\Process\Process::__construct() must be of the type array, string given, called in /laravel/vendor/binarytorch/blogged/src/Commands/InstallCommand.php on line 55

solution
update file /laravel/vendor/binarytorch/blogged/src/Commands/InstallCommand.php on line 55
with below code.

$process = new Process([$composer.'dump-autoload']);

@alariva
Copy link

alariva commented Jan 4, 2021

Same problem (Laravel 7.30.1), same solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants