Repository navigation
Add support for phpseclib v3 and v4 - #12
Merged
Merged
Conversation
composer.json only allows phpseclib ^2.0, so the PEAR-style Net_SFTP, Crypt_RSA and NET_SFTP_LOCAL_FILE code paths are unreachable.
size() was removed in phpseclib v4, filesize() is available in v2, v3 and v4.
The constant is defined on phpseclib\Net\SFTP (v2), phpseclib3\Net\SFTP (v3) and phpseclib4\Net\SFTP (v4), so read it from the instantiated class.
The signature is mkdir($dir, $mode = -1, $recursive = false) in phpseclib v2, v3 and v4, so `true` was passed as $mode and directories were never created recursively. With strict_types and phpseclib v4's typed $mode parameter this also causes a TypeError.
Without the recursive flag phpseclib removes the path as a file, which fails for directories. The FTP implementation already deletes recursively.
The SFTP test was always skipped. Start an atmoz/sftp service container in CI and configure the test via SFTP_* environment variables. The test is still skipped if SFTP_HOST is not set.
W0rma
force-pushed
the
update-phpseclib
branch
3 times, most recently
from
November 3, 2026 07:41
8868552 to
8ad134f
Compare
W0rma
force-pushed
the
update-phpseclib
branch
from
November 3, 2026 07:47
8ad134f to
5e28878
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11