Skip to content

Releases: cyvax/Privatebin_PHP

v2.0.0

23 May 15:35

Choose a tag to compare

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:
      • HttpClientInterface
      • PasteEncryptorInterface
      • Base58Interface
    • Custom clients can be made by using \Cyvax\Internal\PrivatebinCore
  • Improved exception handling
    • PrivatebinException now exposes:
      • getStatus()
      • getResponseData()
  • Complete documentation overhaul
    • The GitHub wiki now includes full documentation for all clients, interfaces, and exceptions
  • Optional extensions
    • ext-zlib
    • ext-fileinfo
    • ext-gmp

Note

None are hard requirements, exceptions will be thrown at runtime if a missing extension is actually needed.


Other changes

  • Removed the tuupola/base58 dependency
    • Replaced with a bundled Base58 implementation
    • tuupola/base58 or other implementation can be used through an adapter implementing Base58Interface
  • Added a full test suite (test suite needing PHP 8.5)

v1.1.2

18 Jul 11:27
530ac28

Choose a tag to compare

add change made by @nhoag

1.1

09 Nov 17:58
f33d350

Choose a tag to compare

1.1

well we have a Privatebin_PHP library now