php-http/client-common
Common HTTP Client implementations and tools for HTTPlug
2.7.3
245M downloads/mo
#301 most downloaded on Packagist
php-http/client-common
What this package is like to depend on
Last release 8 months ago
29 Nov 2025
Ships fairly regularly
a new release about every 8 months
Nearly every release is documented
notes for 35 of 35 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
36 releases · first in 2015
1 release in the last 12 months
see the full history below
Release timeline
36 releases · Dec 2015 to Nov 2025
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Releases
latest 36-
2.7.329 Nov 2025 -
2.7.224 Sep 2024Release notes
Open source →- Updated code to not raise warnings for nullable parameters in PHP 8.4.
- Cleaned up PHPDoc comments.
Release notes
Open source →- Updated code to not raise warnings for nullable parameters in PHP 8.4.
- Cleaned up PHPDoc comments.
-
2.7.130 Nov 2023 -
2.7.017 May 2023Release notes
Open source →- Dropped
php-http/message-factoryfrom composer requirements as it is abandoned and this package does not actually use it.
Release notes
Open source →- Dropped
php-http/message-factoryfrom composer requirements as it is abandoned and this package does not actually use it.
- Dropped
-
2.6.114 Apr 2023Release notes
Open source →- Allow installation with http-message (PSR-7) version 2 in addition to version 1.
- Support for PHP 8.2
Release notes
Open source →- Allow installation with http-message (PSR-7) version 2 in addition to version 1.
- Support for PHP 8.2
-
2.6.029 Sep 2022Release notes
Open source →- [RedirectPlugin] Redirection of non GET/HEAD requests with a body now removes the body on follow-up requests, if the
HTTP method changes. To do this, the plugin needs to find a PSR-7 stream implementation. If none is found, you can
explicitly pass a PSR-17 StreamFactoryInterface in thestream_factoryoption.
To keep sending the body in all cases, set thestream_factoryoption to null explicitly.
Release notes
Open source →- [RedirectPlugin] Redirection of non GET/HEAD requests with a body now removes the body on follow-up requests, if the
HTTP method changes. To do this, the plugin needs to find a PSR-7 stream implementation. If none is found, you can
explicitly pass a PSR-17 StreamFactoryInterface in the
stream_factoryoption. To keep sending the body in all cases, set thestream_factoryoption to null explicitly.
- [RedirectPlugin] Redirection of non GET/HEAD requests with a body now removes the body on follow-up requests, if the
-
2.5.129 Sep 2022Release notes
Open source →- [RedirectPlugin] Fixed handling of redirection to different domain with default port
- [RedirectPlugin] Fixed false positive circular detection in RedirectPlugin in cases when target location does not contain path
Release notes
Open source →Fixed
- [RedirectPlugin] Fixed handling of redirection to different domain with default port
- [RedirectPlugin] Fixed false positive circular detection in RedirectPlugin in cases when target location does not contain path
-
2.5.026 Nov 2021Release notes
Open source →Added
- Support for Symfony 6
- Support for PHP 8.1
Changed
- Dropped support for Symfony 2 and 3 - please keep using version 2.4.0 of this library if you can't update Symfony.
Release notes
Open source →Added
- Support for Symfony 6
- Support for PHP 8.1
Changed
- Dropped support for Symfony 2 and 3 - please keep using version 2.4.0 of this library if you can't update Symfony.
-
2.4.005 Jul 2021Release notes
Open source →Added
strictoption toRedirectPluginto allow preserving the request method on redirections with status 300, 301 and 302.
Release notes
Open source →Added
strictoption toRedirectPluginto allow preserving the request method on redirections with status 300, 301 and 302.
-
2.3.021 Jul 2020Release notes
Open source →Fixed
- HttpMethodsClient with PSR RequestFactory
- Bug in the cookie plugin with empty cookies
- Bug when parsing null-valued date headers
Changed
- Deprecation when constructing a HttpMethodsClient with PSR RequestFactory but without a StreamFactory
-
2.2.113 Jul 2020 -
2.2.002 Jul 2020Release notes
Open source →Added
- Plugin client builder for making a
PluginClient - Support for the PSR-17 request factory in
HttpMethodsClient
Changed
- Restored support for
symfony/options-resolver: ^2.6 - Consistent implementation of union type checking
Fixed
- Memory leak when using the
PluginClientwith plugins
- Plugin client builder for making a
-
2.1.018 Nov 2019 -
2.0.003 Feb 2019Release notes
Open source →Changed
- HttpClientRouter now throws a HttpClientNoMatchException instead of a RequestException if it can not find a client for the request.
- RetryPlugin will only retry exceptions when there is no response, or a response in the 5xx HTTP code range.
- RetryPlugin also retries when no exception is thrown if the responses has HTTP code in the 5xx range. The callbacks for exception handling have been renamed and callbacks for response handling have been added.
- Abstract method
HttpClientPool::chooseHttpClient()has now an explicit return type (Http\Client\Common\HttpClientPoolItem) - Interface method
Plugin::handleRequest(...)has now an explicit return type (Http\Promise\Promise) - Made classes final that are not intended to be extended.
- Added interfaces for BatchClient, HttpClientRouter and HttpMethodsClient.
(These interfaces use the
Interfacesuffix to avoid name collisions.) - Added an interface for HttpClientPool and moved the abstract class to the HttpClientPool sub namespace.
- AddPathPlugin: Do not add the prefix if the URL already has the same prefix.
- All exceptions in
Http\Client\Common\Exceptionare final.
Removed
- Deprecated option
debug_pluginshas been removed fromPluginClient - Deprecated options
decideranddelayhave been removed fromRetryPlugin, useexception_deciderandexception_delayinstead.
-
2.0.0-RC121 Jan 2019 pre-releaseNothing published for this version
-
1.11.011 Jul 2021Release notes
Open source →- Backported from version 2: AddPathPlugin: Do not add the prefix if the URL already has the same prefix.
Release notes
Open source →Changed
- Backported from version 2: AddPathPlugin: Do not add the prefix if the URL already has the same prefix.
-
1.10.018 Nov 2019 -
1.9.102 Feb 2019 -
1.9.003 Jan 2019Release notes
Open source →Added
- Support for PSR-18 clients
- Added traits
VersionBridgePluginandVersionBridgeClientto help plugins and clients to support both 1.x and 2.x version ofphp-http/client-commonandphp-http/httplug.
Changed
- RetryPlugin: Renamed the configuration options for the exception retry callback from
decidertoexception_decideranddelaytoexception_delay. The old names still work but are deprecated.
-
1.8.214 Dec 2018Release notes
Open source →Changed
- When multiple cookies exist, a single header with all cookies is sent as per RFC 6265 Section 5.4
- AddPathPlugin will now trim of ending slashes in paths
-
1.8.109 Oct 2018Release notes
Open source →Fixed
- Reverted change to RetryPlugin so it again waits when retrying to avoid "can only throw objects" error.
-
1.8.022 Jun 2018Release notes
Open source →Added
- Add an option on ErrorPlugin to only throw exception on response with 5XX status code.
Changed
- AddPathPlugin no longer add prefix multiple times if a request is restarted - it now only adds the prefix if that request chain has not yet passed through the AddPathPlugin
- RetryPlugin no longer wait for retried requests and use a deferred promise instead
Fixed
- Decoder plugin will now remove header when there is no more encoding, instead of setting to an empty array
-
1.7.030 Nov 2017 -
v1.6.016 Oct 2017Release notes
Open source →Added
- Add HttpClientPool client to leverage load balancing and fallback mechanism see the documentation for more details.
PluginClientFactoryto createPluginClientinstances.- Added new option 'delay' for
RetryPlugin. - Added new option 'decider' for
RetryPlugin. - Supports more cookie date formats in the Cookie Plugin
Changed
- The
RetryPlugindoes now wait between retries. To disable/change this feature you must write something like:
$plugin = new RetryPlugin(['delay' => function(RequestInterface $request, Exception $e, $retries) { return 0; });Deprecated
- The
debug_pluginsoption forPluginClientis deprecated and will be removed in 2.0. Use the decorator design pattern instead like in ProfilePlugin.
-
1.5.030 Mar 2017 -
v1.4.218 Mar 2017Release notes
Open source →Deprecated
DecoderPlugindoes not longer claim to supportcompresscontent encoding
Fixed
CookiePluginallows main domain cookies to be sent/stored for subdomainsDecoderPluginuses the rightFilteredStreamto handledeflatecontent encoding
-
v1.4.120 Feb 2017Release notes
Open source →Fixed
- Cast return value of
StreamInterface::getSizeto string inContentLengthPlugin
- Cast return value of
-
v1.4.004 Nov 2016Release notes
Open source →Added
- Add Path plugin
- Base URI plugin that combines Add Host and Add Path plugins
-
1.3.016 Oct 2016Release notes
Open source →Changed
- Fix Emulated Trait to use Http based promise which respect the HttpAsyncClient interface
- Require Httplug 1.1 where we use HTTP specific promises.
- RedirectPlugin: use the full URL instead of the URI to properly keep track of redirects
- Add AddPathPlugin for API URLs with base path
- Add BaseUriPlugin that combines AddHostPlugin and AddPathPlugin
-
v1.2.126 Jul 2016 -
v1.2.014 Jul 2016Release notes
Open source →Added
- Suggest separate plugins in composer.json
- Introduced
debug_pluginsoption forPluginClient
-
v1.1.004 May 2016Release notes
Open source →Added
- Add a flexible http client providing both contract, and only emulating what's necessary
- HTTP Client Router: route requests to underlying clients
- Plugin client and core plugins moved here from
php-http/plugins
Deprecated
- Extending client classes, they will be made final in version 2.0
-
v1.0.027 Jan 2016 -
v0.2.012 Jan 2016 -
v0.1.126 Dec 2015 -
v0.1.025 Dec 2015Release notes
Open source →Added
- Batch client from utils
- Methods client from utils
- Emulators and decorators from client-tools