Download the PHP package mix/guzzle-hook without Composer

On this page you can find all versions of the php package mix/guzzle-hook. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package guzzle-hook

注意:Swoole 已经推出内置 SWOOLE_HOOK_NATIVE_CURLSWOOLE_HOOK_CURL 功能,请使用官方提供的 Hook 功能,本项目将停止维护。

Mix Guzzle

支持 Swoole 协程的 Guzzle, 可无感 Hook 第三方库,同时支持调低 PHP 错误级别

安装

注意:安装后整个项目的 Guzzle 默认 CurlHandler 将会替换为该项目的 StreamHandler,实现了无感 Hook

使用 Composer 安装:

使用

根据 Guzzle 官方文档使用即可:

也可以手动指定 handler 如下:

Elasticsearch PHP 支持

安装后 GuzzleHttp\Ring 的 CurlHandler 将会替换为该项目的 Ring\StreamHandler,实现了无感 Hook

根据 Elasticsearch PHP 官方文档使用即可:

原理

因为 Swoole 的 Hook 只支持 PHP Stream,Guzzle 库默认是使用 CURL 扩展,而 Swoole 不支持在协程中使用 CURL,因此本库将 Guzzle 默认的 CurlHandler 替换为 StreamHandler,并做了一些协程优化处理,让依赖 Guzzle 的第三方库无需修改代码即可使用 Swoole 协程。

支持的第三方库

理论上基于 Guzzle 库开发的 SDK 都可使用本库 Hook,下面是已知的支持 Hook 的第三方库清单:

欢迎提交 PR 更新此清单

License

Apache License Version 2.0, http://www.apache.org/licenses/


All versions of guzzle-hook with dependencies

PHP Build Version
Package Version
Requires funkjedi/composer-include-files Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mix/guzzle-hook contains the following files

Loading the files please wait ....