Download the PHP package hypervel/guzzle without Composer
On this page you can find all versions of the php package hypervel/guzzle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hypervel/guzzle
More information about hypervel/guzzle
Files in hypervel/guzzle
Package guzzle
Short Description Hypervel's fork of Guzzle, a PHP HTTP client library
License MIT
Informations about the package guzzle
Guzzle, PHP HTTP Client
This is Hypervel's fork of Guzzle for Swoole coroutines. It replaces
guzzlehttp/guzzle and adds coroutine ownership checks and global middleware.
See Hypervel Fork.
Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and trivial to integrate with web services.
- Simple interface for building query strings, POST requests, streaming large uploads, streaming large downloads, using HTTP cookies, uploading JSON data, etc...
- Can send both synchronous and asynchronous requests using the same interface.
- Uses PSR-7 interfaces for requests, responses, and streams. This allows you to utilize other PSR-7 compatible libraries with Guzzle.
- Supports PSR-18, allowing interoperability with other PSR-18 HTTP clients.
- Abstracts away the underlying HTTP transport, allowing you to write environment and transport agnostic code; i.e., no hard dependency on cURL, PHP streams, sockets, or non-blocking event loops.
- Middleware system allows you to augment and compose client behavior.
Hypervel Fork
Hypervel runs many Swoole coroutines in one long-lived PHP process. A cURL multi handler that one coroutine is driving must not be driven by another, and framework integrations need to see the requests of every Guzzle client, including clients that SDKs create. This fork adds:
- Shared asynchronous clients. The default handler leases a cURL multi
handler to each coroutine while it has work, then returns it to a pool for
reuse. It keeps up to 64 idle handlers;
max_idle_multi_handlerschanges this limit without limiting active requests. See Coroutine Handlers. - Multi handler ownership. A
CurlMultiHandlerwith pending work belongs to the coroutine driving it. Until the handler is idle, other coroutines can't send requests through it, tick, run or close it, or wait on or cancel its transfers: those calls throw aLogicExceptionwithout changing the handler. See Coroutine Ownership. - Coroutine cancellation. Canceling a coroutine interrupts the request it is
waiting on and reports Swoole's
CanceledExceptioninstead of a transfer error. See Coroutine Cancellation. - Transfer tracking. When the promise task queue implements
ScopedTaskQueueInterfacefromhypervel/guzzle-promises, the multi handler tracks its pending native work, so the queue can cancel transfers that a coroutine leaves unfinished when it ends, including those whose response promises were settled directly. - Global middleware.
Client::pushGlobalMiddleware()andClient::removeGlobalMiddleware()manage named middleware that wraps the transfers of every client in the process. See Global Middleware. - More idle cURL handles.
CurlHandlerkeeps up to 256 idle easy handles by default instead of 3. Coroutines overlap synchronous requests on one handler, and each easy handle has its own connection cache, so with 3 most concurrent requests would open new connections.CurlMultiHandlerkeeps its default of- See Idle cURL Handles.
- Fixes not in upstream. Setting a cookie the jar already holds also removes stored cookies that were changed into duplicates of it. Response header parsing, request URI building and IDN conversion keep their header and URI arguments out of exception traces, as these can carry credentials.
[!IMPORTANT] This fork keeps upstream's public API. Once installed, it replaces
guzzlehttp/guzzlefor packages with compatible version requirements, including third-party packages and SDKs, so their existing code keeps working unchanged. Changes to the fork must stay backward compatible.
Installation
The recommended way to install Guzzle is through Composer.
Version Guidance
This fork requires PHP 8.4 or newer and Swoole 6.3.0 RC2 or a later 6.x release.
composer.json lists the exact requirements. Each fork version
is the upstream release it is based on plus a fork release number. For example,
8.2.0.1 is the first fork release based on upstream 8.2.0.
Quick Start
For more examples, see the Quick Start.
Documentation
- Quick Start
- Overview
- Request Options
- Uploading Data
- Cookies
- Exceptions
- Guzzle and PSR-7
- Handlers
- Middleware
- Testing Guzzle Clients
- FAQ
- Package Ecosystem
- Upgrade Guide
- Changelog
For support questions, ideas, and feature requests, please use GitHub Discussions.
Security
If you discover a security vulnerability in this fork, please report it
privately by emailing Albert Chen at
[email protected]. Please do not report security
vulnerabilities through public GitHub issues or discussions. If it also affects
guzzlehttp/guzzle, please report it upstream as well through their
Security Policy.
License
Guzzle is made available under the MIT License (MIT). Please see License File for more information.
All versions of guzzle with dependencies
ext-json Version *
ext-swoole Version ^6.3.0RC2
guzzlehttp/psr7 Version ^3.6
hypervel/guzzle-promises Version ^3.2
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
symfony/deprecation-contracts Version ^2.5 || ^3.0
symfony/polyfill-php80 Version ^1.25
symfony/polyfill-php82 Version ^1.27