LaravelCollective / remote

Remote SSH Access for the Laravel Framework
MIT License
276 stars 106 forks source link

Net_SFTP has a deprecated constructor #26

Closed HTMHell closed 8 years ago

HTMHell commented 8 years ago

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 get this error message because this package is using an old version of phpseclib. http://stackoverflow.com/questions/36973861/laravel-5-1-net-sftp-has-a-deprecated-constructor

Can you fix this? Thanks in advanced.

ikari7789 commented 8 years ago

I merged this fix in a while ago, could you please try updating the latest version of the package or check if you're requiring an old version of phpseclib via another package?

mlantz commented 8 years ago

Thanks @ikari7789 for jumping in on that :)

HTMHell commented 8 years ago

@ikari7789 I have the latest version of 5.1, on my composer.json: "laravelcollective/remote": "5.1.*" And still having this issue after composer update...

ikari7789 commented 8 years ago

Well the latest release for 5.1.x requires phpseclib >= 2.0 which has the updated namespaces. The PHPdoc in SecLibGateway.php could be updated, but that doesn't directly affect the code. Could you maybe post a copy of your Composer dependencies and the code that is triggering this warning?

HTMHell commented 8 years ago

@ikari7789

\Config::set('remote.connections.dl.host', $server->ip);
\SSH::into('dl')->run($commands);
    "php": ">=5.5.9",
    "laravel/framework": "5.1.*",
    "guzzlehttp/guzzle": "^6.1",
    "webpatser/laravel-countries": "1.4.3",
    "graham-campbell/throttle": "^5.0",
    "vinkla/hashids": "^2.2",
    "torann/geoip": "0.2.2",
    "doctrine/dbal": "^2.5",
    "greggilbert/recaptcha": "dev-master",
    "illuminate/html": "5.*",
    "laravel/socialite": "^2.0",
    "schuppo/password-strength": "~1.0",
    "jenssegers/agent": "^2.3",
    "predis/predis": "^1.0",
    "laravelcollective/remote": "5.1.*",
    "tymon/jwt-auth": "0.5.*",
    "dingo/api": "1.0.0-beta2",
    "yajra/laravel-datatables-oracle": "~5.0"

Thank you very much for your help!

ikari7789 commented 8 years ago

I just tried checking out that dependency list and for some reason it is grabbing 5.1.2 for laravelcollective/remote, even though the latest version is 5.1.6. When I tried changing the required version to 5.1.6 instead of 5.1.*, composer didn't like it to me. It seems that namshi/jose requires phpseclib/phpseclib ~0.3, which is required by tymon/jwt-auth. In order to fix this you're going to have to bother the author of tymon/jwt-auth to update the version of namshi/jose they're requiring.

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: remove namshi/jose 5.0.2
    - Conclusion: remove phpseclib/phpseclib 0.3.10
    - Installation request for laravelcollective/remote 5.1.6 -> satisfiable by laravelcollective/remote[v5.1.6].
    - tymon/jwt-auth 0.5.9 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.2, 5.0.0, 5.0.1].
    - tymon/jwt-auth 0.5.1 requires namshi/jose 2.2.* -> satisfiable by namshi/jose[2.2.0, 2.2.1, 2.2.2].
    - tymon/jwt-auth 0.5.2 requires namshi/jose 2.2.* -> satisfiable by namshi/jose[2.2.0, 2.2.1, 2.2.2].
    - tymon/jwt-auth 0.5.3 requires namshi/jose 2.2.* -> satisfiable by namshi/jose[2.2.0, 2.2.1, 2.2.2].
    - tymon/jwt-auth 0.5.0 requires namshi/jose 2.0.* -> satisfiable by namshi/jose[2.0.0, 2.0.1, 2.0.2, 2.0.3].
    - tymon/jwt-auth 0.5.9 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.2, 5.0.0, 5.0.1].
    - tymon/jwt-auth 0.5.8 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.2, 5.0.0, 5.0.1].
    - tymon/jwt-auth 0.5.7 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.2, 5.0.0, 5.0.1].
    - tymon/jwt-auth 0.5.6 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.2, 5.0.0, 5.0.1].
    - tymon/jwt-auth 0.5.5 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.2, 5.0.0, 5.0.1].
    - tymon/jwt-auth 0.5.4 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.2, 5.0.0, 5.0.1].
    - namshi/jose 5.0.2 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.10, 0.3.0, 0.3.1, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9].
    - namshi/jose 2.2.2 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.10, 0.3.0, 0.3.1, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9].
    - namshi/jose 2.2.1 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.10, 0.3.0, 0.3.1, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9].
    - namshi/jose 2.2.0 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.10, 0.3.0, 0.3.1, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9].
    - namshi/jose 2.0.3 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.10, 0.3.0, 0.3.1, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9].
    - namshi/jose 2.0.2 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.10, 0.3.0, 0.3.1, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9].
    - namshi/jose 2.0.1 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.10, 0.3.0, 0.3.1, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9].
    - namshi/jose 2.0.0 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.10, 0.3.0, 0.3.1, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9].
    - namshi/jose 5.0.1 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.10, 0.3.0, 0.3.1, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9].
    - namshi/jose 5.0.0 requires phpseclib/phpseclib ~0.3 -> satisfiable by phpseclib/phpseclib[0.3.10, 0.3.0, 0.3.1, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9].
    - Can only install one of: phpseclib/phpseclib[2.0.0, 0.3.0].
    - Can only install one of: phpseclib/phpseclib[2.0.0, 0.3.1].
    - Can only install one of: phpseclib/phpseclib[2.0.0, 0.3.10].
    - Can only install one of: phpseclib/phpseclib[2.0.0, 0.3.5].
    - Can only install one of: phpseclib/phpseclib[2.0.0, 0.3.6].
    - Can only install one of: phpseclib/phpseclib[2.0.0, 0.3.7].
    - Can only install one of: phpseclib/phpseclib[2.0.0, 0.3.8].
    - Can only install one of: phpseclib/phpseclib[2.0.0, 0.3.9].
    - laravelcollective/remote v5.1.6 requires phpseclib/phpseclib ^2.0 -> satisfiable by phpseclib/phpseclib[2.0.0, 2.0.1].
    - Conclusion: don't install phpseclib/phpseclib 2.0.1
    - Installation request for tymon/jwt-auth 0.5.* -> satisfiable by tymon/jwt-auth[0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 0.5.8, 0.5.9].
mlantz commented 8 years ago

It appears that tymon/jwt-auth has the updated package in the alpha release currently so I'm closing this issue.