laravel / envoy

Elegant SSH tasks for PHP.
https://laravel.com/docs/envoy
MIT License
1.57k stars 178 forks source link

Cannot use envoy without Laravel #184

Closed paullaffitte closed 4 years ago

paullaffitte commented 4 years ago

Description:

When installed globally like said in the docs, envoy fail to run. Actually I need to install it as a dev dependency of my Laravel project to make it work. This is annoying because I don't want to install my project dependencies on my CI pipeline (using gitlab), because it then takes more time to deploy and is not used for deployment since it's not run on my production server.

Here is the error that I get :

Fatal error: Uncaught Error: Call to undefined method Symfony\Component\Process\Process::fromShellCommandline() in /root/.composer/vendor/laravel/envoy/src/RemoteProcessor.php:57
 Stack trace:
 #0 /root/.composer/vendor/laravel/envoy/src/SSH.php(29): Laravel\Envoy\RemoteProcessor->getProcess('deployer@worlda...', Object(Laravel\Envoy\Task))
 #1 /root/.composer/vendor/laravel/envoy/src/Console/RunCommand.php(167): Laravel\Envoy\SSH->run(Object(Laravel\Envoy\Task), Object(Closure))
 #2 /root/.composer/vendor/laravel/envoy/src/Console/RunCommand.php(149): Laravel\Envoy\Console\RunCommand->passToRemoteProcessor(Object(Laravel\Envoy\Task))
 #3 /root/.composer/vendor/laravel/envoy/src/Console/RunCommand.php(120): Laravel\Envoy\Console\RunCommand->runTaskOverSSH(Object(Laravel\Envoy\Task))
 #4 /root/.composer/vendor/laravel/envoy/src/Console/RunCommand.php(66): Laravel\Envoy\Console\RunCommand->runTask(Object(Laravel\Envoy\TaskContainer), 'clone_repositor...')
 #5 /root/.composer/vendor/laravel/envoy/src/Console/Command.php(24): Larave in /root/.composer/vendor/laravel/envoy/src/RemoteProcessor.php on line 57

Steps To Reproduce:

composer global require laravel/envoy --no-progress ~/.composer/vendor/bin/envoy run deploy --commit="$CI_COMMIT_SHA"

driesvints commented 4 years ago

I'm currently using Envoy as a global just fine. Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to report back and I'll gladly help you out and re-open this issue.

Thanks!

paullaffitte commented 4 years ago

Actually I found another issue about the same problem that I have #178 and it seems that the dependencies used in this version are just obsolete. Maybe you have manually upgraded them to make it work globally, but it should not be considered as stable then. I guess the only solution that I have now is to downgrade to the previous version, or maybe upgrade to 2.x.

Now I have a question because I read in the upgrade guide to 2.x that it will only support Laravel since version 6.0. What does it means? If Envoy can run in standalone why Laravel 6.0 would be a minimum requirement?

driesvints commented 4 years ago

@paullaffitte People also use envoy as a dependency of their Laravel apps.