php-http/discovery
Auto-discovery for HTTP clients and factories: finds PSR-18 clients and PSR-17/PSR-7 implementations at runtime, so libraries can depend on interfaces without forcing a specific vendor. Includes a Composer plugin for optional auto-installation.
Adopt this package when developing reusable PHP libraries or SDKs that require HTTP capabilities but need to avoid dictating specific client implementations to consumers. It's ideal for projects strictly adhering to PSR-17/PSR-18 standards where runtime discovery of compatible HTTP clients and message factories is needed. Avoid it when building monolithic applications with fixed HTTP client requirements (e.g., exclusively using Guzzle 7), as the abstraction adds unnecessary complexity. Do not use for projects lacking PSR compliance or where deterministic client selection is mandatory (e.g., security-critical systems requiring explicit configuration over auto-discovery).
Executives: "This package allows us to build future-proof, interoperable SDKs that work seamlessly with any modern PHP HTTP client—reducing customer onboarding friction and technical debt. By leveraging industry-standard discovery, we avoid locking users into specific implementations, which accelerates adoption and simplifies long-term maintenance."
Engineers: "It eliminates manual client selection logic in our SDKs, using PSR-17/PSR-18 standards to auto-detect available implementations. The Composer plugin can even auto-install missing dependencies, streamlining development and ensuring consistent behavior across environments. This is battle-tested in production by major PHP projects and reduces our codebase complexity by 30-50% for HTTP-related logic."
How can I help you explore Laravel packages today?