贡献

指导方针

  1. Guzzle utilizes PSR-1, PSR-2, PSR-4, and PSR-7.
  2. Guzzle is meant to be lean and fast with very few dependencies. This means that not every feature request will be accepted.
  3. Guzzle has a minimum PHP version requirement of PHP 5.5. Pull requests must not require a PHP version greater than PHP 5.5 unless the feature is only utilized conditionally.
  4. All pull requests must include unit tests to ensure the change works as expected and to prevent regressions.

测试

In order to contribute, you’ll need to checkout the source from GitHub and install Guzzle’s dependencies using Composer:

  1. git clone https://github.com/guzzle/guzzle.git
  2. cd guzzle && curl -s http://getcomposer.org/installer | php && ./composer.phar install --dev

Guzzle is unit tested with PHPUnit. Run the tests using the Makefile:

  1. make test

注解

You’ll need to install node.js v0.5.0 or newer in order to perform integration tests on Guzzle’s HTTP handlers.