blogged icon indicating copy to clipboard operation
blogged copied to clipboard

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

Open larsbo opened this issue 4 years ago • 2 comments

Describe the bug The install command fails with a TypeError caused by wrong Process() parameter usage here (it expects an array as first parameter): https://github.com/saleem-hadad/blogged/blob/4c7d12b62d429862dfdd7fe6fdd21ddac2b2b1a6/src/Commands/InstallCommand.php#L55

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

larsbo avatar Jun 04 '20 04:06 larsbo

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']);

virenderscideas avatar Aug 13 '20 17:08 virenderscideas

Same problem (Laravel 7.30.1), same solution.

alariva avatar Jan 04 '21 15:01 alariva