laravel / envoy

Elegant SSH tasks for PHP.

Home Page:https://laravel.com/docs/envoy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Call to undefined method fromShellCommandline and Bad port for SSH connection

peterpan666 opened this issue · comments

  • Envoy Version: 1.6.4
  • PHP Version: 7.2

Description:

Hi, I ran Envoy on CircleCI and got an error I don't have on v1.6.1 I think the bug arrived on 1.6.4. Here is the error I got

Fatal error: Uncaught Error: Call to undefined method Symfony\Component\Process\Process::fromShellCommandline() in /home/circleci/.composer/vendor/laravel/envoy/src/RemoteProcessor.php on line 57

I fixed Envoy version to 1.6.3 and got another error

[-p XX user@example.com]: Bad port ' XX user@example.com'
[✗] This task did not complete successfully on one of your servers.

The SSH port is not 22 on this server.

Everything works fine on Envoy 1.6.1 though.

I use this image on CircleCI circleci/php:7.2-node-browsers

Cheers

It seems this method was added only in Symfony 4.2 so I suspect you're running a lower version. Try upgrading symfony. In the meantime I'll whip up a PR to remove support for older versions.

We'll probably release Envoy 2.0 soon which will drop support for old versions. We're currently waiting a bit to see how symfony/symfony#32126 plays out before doing the release. In the meantime please use v1.6.1 for now.

Does Envoy use my local symfony components? Or global?

@peterpan666 depends if you've installed it locally or globally

It's installed globally, I thought Envoy does not work locally. Envoy is the only package I install globally on the CircleCI image, but I don't know if other packages are shipped with a basic CircleCI image though.

I use Envoy locally a lot myself

@peterpan666 can you confirm this was fixed if you update tot he latest 4.x version of symfony/process?

Hi Dries,

I can't test it right now 😕

I'll just fix the version of Envoy until 2.0 is released, I've got many projects to maintain and it's the better solution I've got right now.

Thanks for your help!