sam-it/symfony-http-psr18

Provides a Symfony HttpClientInterface that wraps PSR17 and PSR18

Maintainers

👁 SamMousa

Package info

github.com/SAM-IT/symfony-http-psr18

pkg:composer/sam-it/symfony-http-psr18

Statistics

Installs: 21 983

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v2.1.0 2025-06-04 07:27 UTC

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT c15a701b31bfe89e2cedac009d9eb695df19ae03

  • Sam Mousa <sam.woop@mousa.nl>

This package is auto-updated.

Last update: 2026-06-04 09:31:59 UTC


README

This package wraps the relevant PSR interfaces to provide Symfony's HttpClientInterface.

  • It is not complete with respect to the supported options
  • It will throw exceptions when it encounters unsupported options as required by the contract
  • It DOES NOT use lazy responses and which explicitly VIOLATES the contract.

Why is this needed

Currently packages like symfony/mailer require an implementation of Symfony's HttpClientInterface. With the PSR standards related to sending HTTP requests maturing projects not using these components in a standalone fashion might be forced into using Symfony's HTTP Client when they already have another HTTP Client implementation set up.

This package provides a lightweight adapter that allows you to use your existing PSR18 Http Client and pass it to Symfony components that require Symfony's HttpClientInterface. Since we do not support lazy responses you should evaluate what kind of usage you expect before using this adapter.