swlib/http
swlib/http is a lightweight HTTP message library for PHP and Swoole, providing request, response, URI, and stream objects for coroutine-friendly clients and servers. It offers a simple foundation for building HTTP interactions without heavy framework dependencies.
psr/http-message) defines immutable request/response/value-object interfaces. Adopting a PSR-7 implementation lets you write domain and integration code against interfaces instead of a concrete client — the decision that actually matters here is "interface vs. vendor SDK," not "which wrapper library."guzzlehttp/psr7). swlib/http therefore competes with a component you already have, not with a build-from-scratch effort. Its stated value ("PSR-7 implementation, thanks to Guzzle") is a thin re-wrap of a dependency you get for free.Consider it only when:
composer.lock — i.e., you inherited it via a transitive or legacy dependency and need to understand and plan around it, not introduce it.Look elsewhere by default. Signals against adoption:
guzzlehttp/psr7, nyholm/psr7, laminas/laminas-diactoros). Choosing the least-maintained one buys you nothing.Due diligence checklist if it is proposed: who owns it, where the canonical repo lives, PHP 8.1→8.4 compatibility, CVE/security-advisory pipeline, transitive dependency graph, and a written exit plan. Absent satisfactory answers, the recommendation is to standardize on guzzlehttp/psr7 behind the psr/http-message interfaces and avoid a hard dependency on this package.
For executives (one paragraph): swlib/http is a small, MIT-licensed PHP library that implements an industry-standard HTTP interface. It is free to use, but it has had no release since August 2020, has negligible community adoption, and its source repository cannot be verified. That combination means we would own the maintenance of a component we do not need: our framework already provides equivalent, actively maintained functionality at no cost. My recommendation is not to adopt it as a dependency; where it already exists, treat it as technical debt with a scheduled removal. The business case is straightforward — the licensing cost is zero, but the ongoing maintenance, upgrade-friction, and security-review costs are non-trivial and entirely avoidable.
For engineering (summary): Write against the PSR-7 interfaces (psr/http-message), not against a concrete library. The specification is stable and its implementations are interchangeable, so the interface choice is the durable architectural decision and the implementation is a one-line swap. Back that interface with guzzlehttp/psr7, which is what Laravel and Guzzle already pull in, is actively maintained, and supports current PHP versions. Keep your HTTP clients behind your own thin abstraction (a small client interface plus a handler/middleware stack) so retries, correlation IDs, auth signing, and test doubles are composed rather than inherited from a vendor. Migration cost away from swlib/http is bounded precisely because the contract is a standard: replace the message factory and keep the call sites. If the package is currently in the lockfile, add a ticket to remove it during the next dependency-refresh cycle rather than bundling it into feature work.
How can I help you explore Laravel packages today?