pyrocms / pyrocms

Pyro is an experienced and powerful Laravel PHP CMS.

Home Page:https://www.pyrocms.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

anomalylabs/addons-module ComposerProcess command type error

positron48 opened this issue · comments

I have a new clear installation of PyroCMS. If I try to install any module (e.g. Comments) I get the error -

TypeError: Argument 1 passed to Symfony\Component\Process\Process::__construct() must be of the type array, string given, called in /mnt/f/my/web/blog/vendor/anomaly/addons-module/src/Composer/ComposerProcess.php on line 32 in file /mnt/f/my/web/blog/vendor/symfony/process/Process.php on line 141
Stack trace:
  1. TypeError->() /mnt/f/my/web/blog/vendor/symfony/process/Process.php:141
  2. Symfony\Component\Process\Process->__construct() /mnt/f/my/web/blog/vendor/anomaly/addons-module/src/Composer/ComposerProcess.php:32
  3. Anomaly\AddonsModule\Composer\ComposerProcess->make() /mnt/f/my/web/blog/vendor/anomaly/addons-module/src/Console/Download.php:52
  4. Anomaly\AddonsModule\Console\Download->handle() /mnt/f/my/web/blog/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
  ....

Reason of this error described here: https://github.com/symfony/symfony/blob/5.x/UPGRADE-5.0.md#process

It works if I replace new Process to Process::fromShellCommandline here: https://github.com/anomalylabs/addons-module/blob/2.3/src/Composer/ComposerProcess.php#L27.

Another way - downgrade symfony/process to v4.

Unfortunately I am new here and don't know which decision will be better (may be you have another).
Sorry if this issue must be elsewhere. anomaly/addons-module repo has no issue tracker.

anomaly/addons-module v2.3.50
symfony/process v5.2.4
Windows 10 & WSL Ubuntu 18.04. Nginx + mysql + php7.3-fpm

This feature is super meh - closing and will likely change that to display your command only - copy/paste that in your terminal - done.