Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP7 compatibility - Net_SFTP has a deprecated constructor #14

Closed
soee opened this issue Oct 9, 2015 · 1 comment
Closed

PHP7 compatibility - Net_SFTP has a deprecated constructor #14

soee opened this issue Oct 9, 2015 · 1 comment

Comments

@soee
Copy link

soee commented Oct 9, 2015

Hi,

we are trying our Laravel app to run on machine with PHP7. Now when some file transfer should be done it ends with this error:

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

Is it related to this package or phpseclib/phpseclib and the version of it flysystem-sftp depends ?

Looks like phpseclib 2.0 branch should have fixed it see this

@judgej
Copy link
Member

judgej commented Oct 22, 2015

Wow, I thought those kinds of constructors had been removed years ago.

It seems that just having a __construct() method is enough to stop this warning, without breaking older version compatibility (which presumably phpseclib 0.3.8 is trying to retain).

class Filter {
    function __construct() {
        $this->filter($a);
    }

    // Old constructor.
    function filter($a) {}
}

Anyway, that's for them to sort out if still supporting that old version. Just thinking out aloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants