The change log shows what have been Added, Changed, Deprecated and Removed between versions.
- Support for Symfony 5.
- NullException when
file_get_content'serror_get_lastdid not return an array.
- Fixed issue with multiple cookies.
- Fixed
ContentTypeMiddlewaremissing return.
- Default timout was changed from
30to0(no limit).
- Support for HTTP/2 server push.
- Option
expose_curl_infohas been added to expose curl metadata information - Added
CallbackExceptionfor Curl clients.
- Moved
Buzz\UtiltoBuzz\Middleware\Cookie.
MultiCurlwill never throw exception when handling messages asynchronously. All exceptions will be handled in the callback.MultiCurl::sendRequest()will throw exception if one occur.- Make sure
MultiCurl::proceed()is non-blocking.
ContentTypeMiddlewarethat automatically detects content type of the body.
- It is now mandatory to pass a client to the
Browser's constructor. - First argument of
Curl,MultiCurlandFileGetContentclients should be the response factory. - Using stable version of
psr/http-client.
- Added parameter for
ResponseFactorytoAbstractClientconstructor. - Added parameter for
RequestFactorytoBrowserconstructor.
- Not passing a RequestFactory to
Browser. - Not passing a ResponseFactory to the client's constructor.
- Not passing a BuzzClientInterface to the
Browser's constructor.
- Updated composer.json to show that we provide
php-http/client-implementation: 1.0.
- The first argument to all client constructors is an array of options.
- A way to configure default options for a client:
AbstractClient::configureOptions(OptionsResolver $resolver) - Added
ParameterBagto store options. - Added
BatchClientInterface::sendAsyncRequest(RequestInterface $request, array $options = []). - Added
BuzzClientInterface::sendRequest(RequestInterface $request, array $options = []): ResponseInterface. - Ported all Listeners to Middleware.
- Added options to configure the client as constructor argument and when you send a request.
- Removed
RequestandResponse - Removed
AbstractStream. - Removed all listeners and
ListenerInterface - Removed
Curl::getInfo() - Client functions like
AbstractClient::setIgnoreErrors(),AbstractClient::getIgnoreErrors(),AbstractClient::setMaxRedirects(),AbstractClient::getMaxRedirects(),AbstractClient::setTimeout(),AbstractClient::getTimeout(),AbstractClient::setVerifyPeer(),AbstractClient::getVerifyPeer(),AbstractClient::getVerifyHost(),AbstractClient::setVerifyHost(),AbstractClient::setProxy()andAbstractClient::getProxy().
- Redirects are not followed by default
- No exceptions are thrown and no warnings are triggered on a invalid response.
- We only handle PSR requests and responses.
- Renamed
Browser::call($url, $method, $headers, $body)toBrowser::request($method, $url, $headers, $body).
BasicAuthMiddleware,BearerAuthMiddleware,ContentLengthMiddlewareandLoggerMiddleware.Browser::submitForm- Support for middleware chain when using
BatchClientInterface FormRequestBuilderto help build a "form request".- Added HTTP status code constants to
Response.
- Used Curl read function for large bodies.
- Deprecated
Browser::sendin favor forBrowser::sendRequest - Deprecated
Browser::submitin favor forBrowser::submitForm
- Make sure
Browserdoes not call deprecated functions.
- ClientInterface supports PSR7 requests and responses.
- Removed type hint for second parameter for
AbstractCurl::prepare. - Removed type hint for second parameter for
RequestException::setRequest. - Removed type hint for first parameter for
AbstractStream::getStreamContextArray. RequestExceptionsupports both PSR-7 requests and Buzz requests.Response::getProtocolVersionwill return a string and not a float.- Using PHPUnit namespaces.
- Added Request and Response converters
- Added
Curl::sendRequest(),MultiCurl::sendRequest()andFileGetContents::sendRequest()that supports sending PSR-7 requests. - Added
Browser::sendRequest()that supports middleware. - Added
MiddlewareInterfaceandBrowser::addMiddleware(). - Added
HeaderConverterto convert between PSR-7 styled headers and Buzz styled headers.
Curl::send(),MultiCurl::send()andFileGetContents::send()in favor for*::sendRequest().AbstractCurl::populateResponse()was deprecated in favor ofAbstractCurl::createResponse().
- Support for PHP 5.3.
- A
.gitattributeswas added to exclude test files and metadata.
- The reason phrase is allowed to be empty.
MultiCurlwill throw exception when request fails. This makesMultiCurlto have the same behavior asCurlandFileGetContents. (Liskov Substitution Principle)
- Added
BearerAuthListener
- We use PSR-4 instead of PSR-0
- Moved cookie jar implementation from
FileGetContentsclient to a browser listener - Added
DigestAuthListener
- Changed default HTTP protocol version to 1.1
- Added verify host control to
AbstractClient