This release is a major overhaul of the library, driven by a complete architectural redesign focused on long-term maintainability, modularity, and reliability.
As supply chain attacks become increasingly common, all third-party runtime dependencies have been removed in favor of bundled implementations to minimize external attack surface and reduce ecosystem risk.
The library is now fully modular: core components such as HTTP transport, encryption, and Base58 handling can be swapped through dependency injection via their respective interfaces.
Migrating from v1
\Cyvax\PrivatebinPHP is still available as a deprecated compatibility shim pointing to PrivatebinSnakeCase, preserving v1 behavior. Existing code should continue to work without modification.
The only behavioral difference when migrating directly to the new clients is that server-side errors on posts functions now throw PrivatebinException instead of returning error arrays.
The compatibility shim preserves the original return behavior.
New features
- Two new clients
\Cyvax\Clients\Privatebin-> camelCase client\Cyvax\Clients\PrivatebinPipe-> pipe-style client designed for the PHP 8.5|>operator, while remaining compatible with older PHP versions through manual closure invocation
- Full paste lifecycle support
- All clients now expose methods for fetching, decrypting and deleting pastes.
- Dependency injection support
- Custom implementations can now be provided for:
HttpClientInterfacePasteEncryptorInterfaceBase58Interface
- Custom clients can be made by using
\Cyvax\Internal\PrivatebinCore
- Custom implementations can now be provided for:
- Improved exception handling
PrivatebinExceptionnow exposes:getStatus()getResponseData()
- Complete documentation overhaul
- The GitHub wiki now includes full documentation for all clients, interfaces, and exceptions
- Optional extensions
ext-zlibext-fileinfoext-gmp
Note
None are hard requirements, exceptions will be thrown at runtime if a missing extension is actually needed.
Other changes
- Removed the
tuupola/base58dependency- Replaced with a bundled Base58 implementation
tuupola/base58or other implementation can be used through an adapter implementingBase58Interface
- Added a full test suite (test suite needing PHP 8.5)