- Updated type hints in doc blocks.
- Support for PSR-18 clients
- Added traits
VersionBridgePlugin
and VersionBridgeClient
to help plugins and clients to support both
1.x and 2.x version of php-http/client-common
and php-http/httplug
.
- [RetryPlugin] Renamed the configuration options for the exception retry callback from
decider
to exception_decider
and delay
to exception_delay
. The old names still work but are deprecated.
- 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
- Reverted change to RetryPlugin so it again waits when retrying to avoid "can only throw objects" error.
- Add an option on ErrorPlugin to only throw exception on response with 5XX status code.
- 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
- Decoder plugin will now remove header when there is no more encoding, instead of setting to an empty array
- Strict comparison in DecoderPlugin
- Add HttpClientPool client to leverage load balancing and fallback mechanism see the documentation for more details.
PluginClientFactory
to create PluginClient
instances.
- Added new option 'delay' for
RetryPlugin
.
- Added new option 'decider' for
RetryPlugin
.
- Supports more cookie date formats in the Cookie Plugin
- The
RetryPlugin
does 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;
});
- The
debug_plugins
option for PluginClient
is deprecated and will be removed in 2.0. Use the decorator design pattern instead like in ProfilePlugin.
QueryDefaultsPlugin
to add default query parameters.
DecoderPlugin
does not longer claim to support compress
content encoding
CookiePlugin
allows main domain cookies to be sent/stored for subdomains
DecoderPlugin
uses the right FilteredStream
to handle deflate
content encoding
- Cast return value of
StreamInterface::getSize
to string in ContentLengthPlugin
- Add Path plugin
- Base URI plugin that combines Add Host and Add Path plugins
- 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
- AddHostPlugin also sets the port if specified
- Suggest separate plugins in composer.json
- Introduced
debug_plugins
option for PluginClient
- 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
- Extending client classes, they will be made final in version 2.0
- Remove useless interface in BatchException
- Updated package files
- Updated HTTPlug to RC1
- Batch client from utils
- Methods client from utils
- Emulators and decorators from client-tools