guzzle @ 5.0.0
integrity
- size
- 471.1 KiB
- downloaded
- last checked
- overlays
- composer
- detected
- composer guzzlehttp/guzzle
release notes
Adding support for non-blocking responses and some minor API cleanup.
New Features
- Added support for non-blocking responses based on
guzzlehttp/guzzle-ring. - Added a public API for creating a default HTTP adapter.
- Updated the redirect plugin to be non-blocking so that redirects are sent concurrently. Other plugins like this can now be updated to be non-blocking.
- Added a "progress" event so that you can get upload and download progress events.
- Added
GuzzleHttp\Poolwhich implements FutureInterface and transfers requests concurrently using a capped pool size as efficiently as possible. - Added
hasListeners()to EmitterInterface. - Removed
GuzzleHttp\ClientInterface::sendAlland markedGuzzleHttp\Client::sendAllas deprecated (it's still there, just not the recommended way).
Breaking changes
The breaking changes in this release are relatively minor. The biggest thing to look out for is that request and response objects no longer implement fluent interfaces.
- Removed the fluent interfaces (i.e.,
return $this) from requests, responses,GuzzleHttp\Collection,GuzzleHttp\Url,GuzzleHttp\Query,GuzzleHttp\Post\PostBody, andGuzzleHttp\Cookie\SetCookie. This blog post provides a good outline of why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/. This also makes the Guzzle message interfaces compatible with the current PSR-7 message proposal. - Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except
for the HTTP request functions from function.php, these functions are now
implemented in
GuzzleHttp\Utilsusing camelCase.GuzzleHttp\json_decodemoved toGuzzleHttp\Utils::jsonDecode.GuzzleHttp\get_pathmoved toGuzzleHttp\Utils::getPath.GuzzleHttp\set_pathmoved toGuzzleHttp\Utils::setPath.GuzzleHttp\batchshould now beGuzzleHttp\Pool::batch, which returns anSplObjectStorage. Using functions.php caused problems for many users: they aren't PSR-4 compliant, require an explicit include, and needed an if-guard to ensure that the functions are not declared multiple times. - Rewrote adapter layer.
- Removing all classes from
GuzzleHttp\Adapter, these are now implemented as callables that are stored inGuzzleHttp\Ring\Client. - Removed the concept of "parallel adapters". Sending requests serially or concurrently is now handled using a single adapter.
- Moved
GuzzleHttp\Adapter\TransactiontoGuzzleHttp\Transaction. The Transaction object now exposes the request, response, and client as public properties. The getters and setters have been removed.
- Removing all classes from
- Removed the "headers" event. This event was only useful for changing the body a response once the headers of the response were known. You can implement a similar behavior in a number of ways. One example might be to use a FnStream that has access to the transaction being sent. For example, when the first byte is written, you could check if the response headers match your expectations, and if so, change the actual stream body that is being written to.
- Removed the
asArrayparameter fromGuzzleHttp\Message\MessageInterface::getHeader. If you want to get a header value as an array, then use the newly addedgetHeaderAsArray()method ofMessageInterface. This change makes the Guzzle interfaces compatible with the PSR-7 interfaces. GuzzleHttp\Message\MessageFactoryno longer allows subclasses to add custom request options using double-dispatch (this was an implementation detail). Instead, you should now provide an associative array to the constructor which is a mapping of the request option name mapping to a function that applies the option value to a request.- Removed the concept of "throwImmediately" from exceptions and error events. This control mechanism was used to stop a transfer of concurrent requests from completing. This can now be handled by throwing the exception or by cancelling a pool of requests or each outstanding future request individually.
- Updated to "GuzzleHttp\Streams" 3.0.
GuzzleHttp\Stream\StreamInterface::getContents()no longer accepts amaxLenparameter. This update makes the Guzzle streams project compatible with the current PSR-7 proposal.GuzzleHttp\Stream\Stream::__construct,GuzzleHttp\Stream\Stream::factory, andGuzzleHttp\Stream\Utils::createno longer accept a size in the second argument. They now accept an associative array of options, including the "size" key and "metadata" key which can be used to provide custom metadata.
download
unix · zip
curl -fL -o 5.0.0.zip https://ratatoskr.space/pkg/guzzle/5.0.0.zip
printf '%s %s\n' 'ef926153a04a07672c6a41359958ffca7ee31d49ebf28200e3b45924bda190cf' '5.0.0.zip' | sha256sum -c -
windows · zip
$url = "https://ratatoskr.space/pkg/guzzle/5.0.0.zip"
$out = "5.0.0.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "ef926153a04a07672c6a41359958ffca7ee31d49ebf28200e3b45924bda190cf") { throw "sha256 mismatch" }
unix · tar.gz
curl -fL -o 5.0.0.tar.gz https://ratatoskr.space/pkg/guzzle/5.0.0.tar.gz
printf '%s %s\n' '13b10c00758bbb7df4e37bd7da4e1c3ac3552a969bdabef6c86471eca17cb4f2' '5.0.0.tar.gz' | sha256sum -c -
windows · tar.gz
$url = "https://ratatoskr.space/pkg/guzzle/5.0.0.tar.gz"
$out = "5.0.0.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "13b10c00758bbb7df4e37bd7da4e1c3ac3552a969bdabef6c86471eca17cb4f2") { throw "sha256 mismatch" }
download via yggdrasil mesh
unix · zip
curl -fL -o 5.0.0.zip http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/guzzle/5.0.0.zip
printf '%s %s\n' 'ef926153a04a07672c6a41359958ffca7ee31d49ebf28200e3b45924bda190cf' '5.0.0.zip' | sha256sum -c -
windows · zip
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/guzzle/5.0.0.zip"
$out = "5.0.0.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "ef926153a04a07672c6a41359958ffca7ee31d49ebf28200e3b45924bda190cf") { throw "sha256 mismatch" }
unix · tar.gz
curl -fL -o 5.0.0.tar.gz http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/guzzle/5.0.0.tar.gz
printf '%s %s\n' '13b10c00758bbb7df4e37bd7da4e1c3ac3552a969bdabef6c86471eca17cb4f2' '5.0.0.tar.gz' | sha256sum -c -
windows · tar.gz
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/guzzle/5.0.0.tar.gz"
$out = "5.0.0.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "13b10c00758bbb7df4e37bd7da4e1c3ac3552a969bdabef6c86471eca17cb4f2") { throw "sha256 mismatch" }
| artifact | format | size | hashes |
|---|---|---|---|
| 5.0.0.zip | zip | 471.7 KiB |
blake3-24 2e0642704e8dc6727aef021b0270107c87a3c3f4a1aaf41e
sha256 ef926153a04a07672c6a41359958ffca7ee31d49ebf28200e3b45924bda190cf
sha1 275731ed3dfa0a88efc09d898f8eeb5d075bd9b3
|
| 5.0.0.tar.gz | tar.gz | 414.3 KiB |
blake3-24 644ffa1fe6752e88b964c4f9cb9291296feaf6b1b97efbf1
sha256 13b10c00758bbb7df4e37bd7da4e1c3ac3552a969bdabef6c86471eca17cb4f2
sha1 0733a6acb24daa0940fc1e8b3e2fa753205d6ce0
|
install
bazel
http_archive(
name = "guzzle",
urls = ["https://ratatoskr.space/pkg/guzzle/5.0.0.tar.gz"],
integrity = "sha256-E7EMAHWLu33043vX2k4cOsNVKpab2r72yGRx7KF8tPI=",
strip_prefix = "guzzle-5.0.0",
)
zig
.url = "https://ratatoskr.space/pkg/guzzle/5.0.0.tar.gz",
composer
composer config repositories.yggvault composer https://ratatoskr.space/pkg composer require guzzlehttp/guzzle:5.0.0
install via yggdrasil mesh
bazel
http_archive(
name = "guzzle",
urls = ["http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/guzzle/5.0.0.tar.gz"],
integrity = "sha256-E7EMAHWLu33043vX2k4cOsNVKpab2r72yGRx7KF8tPI=",
strip_prefix = "guzzle-5.0.0",
)
zig
.url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/guzzle/5.0.0.tar.gz",
composer
composer config secure-http false composer config repositories.yggvault composer http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg composer require guzzlehttp/guzzle:5.0.0