0

I'm using Laravel 5.1 with the package laravelcollective/remote to run an SSH command on a remote server:

\SSH::into('myserver')->run($commands);

But I'm getting the following error message:

Methods with the same name as their class will not be constructors in a future version of PHP; Net_SFTP has a deprecated constructor

I can see that the error is coming from phpseclib package, and on newer versions they have fixed that. (They changed the function name to __construct), but I can't update phpseclib package because I don't include it on my composer.json file, laravelcollective/remote does this.

How can I solve this?

Artjom B.
  • 61,146
  • 24
  • 125
  • 222
HTMHell
  • 5,761
  • 5
  • 37
  • 79

1 Answers1

3

You cannot and should not solve this as it has already been fixed as you correctly stated.

The warnning about the deprecated construtor method is only a warning/info. This does not influence your application. As soon as laravellcollective include the newer version of phpseclib in their composer.json this warning will disappear. Of course you need the check from time to time and update your application with a composer update.

codedge
  • 4,754
  • 2
  • 22
  • 38