psr-discovery/http-client-implementations
Discovers an installed PSR-18 HTTP client at runtime by checking for well-known implementations and returning the first available instance. Ideal for SDKs/libraries to support PSR-18 without hard dependencies or extra user configuration.
php-http/mock-client) in CI/CD pipelines.Adopt When:
dev environments, reducing flakiness in unit/integration tests.Look Elsewhere If:
php-http/discovery).*"This package lets us standardize HTTP clients across our PHP stack without locking users into a single vendor (e.g., Guzzle vs. Symfony). For example:
*"Problem: Managing HTTP clients in libraries/SDKs is a pain—users get stuck with our forced dependency (e.g., Guzzle v7) or we waste time supporting multiple clients. Solution: This package auto-detects the first available PSR-18 client (Guzzle, Symfony, etc.) at runtime. Key benefits:
composer require or manual setup—just install the package.php-http/mock-client) are prioritized in dev, so tests pass without extra setup.Clients::use('symfony/http-client')) if needed.*"Architectural Impact:
psr/http-client (interface) instead of concrete implementations.How can I help you explore Laravel packages today?