CouscousPHP / Couscous

Couscous is good.
https://couscous.io
Other
841 stars 104 forks source link

Symfony ProcessBuilder not found when running couscous preview #221

Closed ieschwoch closed 6 years ago

ieschwoch commented 6 years ago

I downloaded Couscous using compose per the instructions at http://couscous.io/docs/getting-started.html and I get the below error when running "couscous preview":

PHP Fatal error:  Uncaught Error: Class 'Symfony\Component\Process\ProcessBuilder' not found in /Users/ieschwoch/.composer/vendor/couscous/couscous/src/Application/Cli/PreviewCommand.php:169
Stack trace:
#0 /Users/ieschwoch/.composer/vendor/couscous/couscous/src/Application/Cli/PreviewCommand.php(112): Couscous\Application\Cli\PreviewCommand->startWebServer(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), '/Users/ieschwoch/...')
#1 /Users/ieschwoch/.composer/vendor/symfony/console/Command/Command.php(251): Couscous\Application\Cli\PreviewCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /Users/ieschwoch/.composer/vendor/symfony/console/Application.php(886): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /Users/ieschwoch/.composer/vendor/symfony/console/Application.php(262): Symfony\Component\Consol in /Users/ieschwoch/.composer/vendor/couscous/couscous/src/Application/Cli/PreviewCommand.php on line 169

Versions running (not sure why the couscous version isn't populating):

composer --version
Composer version 1.7.2 2018-08-16 16:57:12

couscous --version
Console Tool

Update: I found that removing Symfony 4.0 support in this line resolves the problem. I think changing the includes from "ProcessBuilder" to "Process" will fix this also as I've seen this work in other projects.

https://github.com/CouscousPHP/Couscous/blob/013e2bbb71735e5a16f012ea60b877f996363acf/composer.json#L22