phpseclib/phpseclib2_compat
A compatibility layer that lets phpseclib 2.0 code run unchanged on phpseclib 3.0, providing namespaced shims for legacy classes and methods so existing projects can upgrade the underlying library without rewriting cryptographic code.
Crypt_RSA, Net_SSH2, Crypt_AES, etc., this is how you keep those contracts alive while modernizing underneath.Adopt it when:
Look elsewhere when:
Before adoption, verify: the actual repository identity and maintainer, the license (MIT is claimed), the release cadence, and whether the latest release date is real rather than a metadata artifact. Pin an exact version and run an SCA/security scan as you would for any crypto-adjacent dependency.
For executives: We are carrying an end-of-life cryptography library that blocks our PHP upgrade and is a standing security finding. This change lets us replace the unsafe internals without rewriting the code that calls into it, so we retire the risk on a short timeline and move the larger refactor into normal roadmap sequencing instead of a special project. Cost is small and the change is reversible. The main caveat is that the compatibility layer is a thin, low-adoption project with a single maintainer, so we are deliberately treating it as a bridge with a removal date rather than a long-term foundation.
For engineering: Install it, keep your existing Crypt_* / Net_* call sites, and get 3.0 internals plus modern PHP support behind them. Three conditions: (1) write characterization tests around every call site first, because behavioral parity isn't guaranteed; (2) add a CI rule that fails on any new 2.0-style API usage; (3) file the true 3.0 namespaced migration as its own backlog item with an owner and a target date. The dependency is transitional by policy — if it's still in the tree a year from now, that's the failure mode we're guarding against.
How can I help you explore Laravel packages today?