blogged
blogged copied to clipboard
Laravel 7.x: Installation error caused by invalid Process() parameter
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:
- execute
php artisan blogged:install
in a fresh Laravel 7.x installation. - 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
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']);
Same problem (Laravel 7.30.1
), same solution.