overview.rst 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. ========
  2. Overview
  3. ========
  4. Requirements
  5. ============
  6. #. PHP 5.5.0
  7. #. To use the PHP stream handler, ``allow_url_fopen`` must be enabled in your
  8. system's php.ini.
  9. #. To use the cURL handler, you must have a recent version of cURL >= 7.19.4
  10. compiled with OpenSSL and zlib.
  11. .. note::
  12. Guzzle no longer requires cURL in order to send HTTP requests. Guzzle will
  13. use the PHP stream wrapper to send HTTP requests if cURL is not installed.
  14. Alternatively, you can provide your own HTTP handler used to send requests.
  15. .. _installation:
  16. Installation
  17. ============
  18. The recommended way to install Guzzle is with
  19. `Composer <http://getcomposer.org>`_. Composer is a dependency management tool
  20. for PHP that allows you to declare the dependencies your project needs and
  21. installs them into your project.
  22. .. code-block:: bash
  23. # Install Composer
  24. curl -sS https://getcomposer.org/installer | php
  25. You can add Guzzle as a dependency using the composer.phar CLI:
  26. .. code-block:: bash
  27. php composer.phar require guzzlehttp/guzzle:~6.0
  28. Alternatively, you can specify Guzzle as a dependency in your project's
  29. existing composer.json file:
  30. .. code-block:: js
  31. {
  32. "require": {
  33. "guzzlehttp/guzzle": "~6.0"
  34. }
  35. }
  36. After installing, you need to require Composer's autoloader:
  37. .. code-block:: php
  38. require 'vendor/autoload.php';
  39. You can find out more on how to install Composer, configure autoloading, and
  40. other best-practices for defining dependencies at `getcomposer.org <http://getcomposer.org>`_.
  41. Bleeding edge
  42. -------------
  43. During your development, you can keep up with the latest changes on the master
  44. branch by setting the version requirement for Guzzle to ``~6.0@dev``.
  45. .. code-block:: js
  46. {
  47. "require": {
  48. "guzzlehttp/guzzle": "~6.0@dev"
  49. }
  50. }
  51. License
  52. =======
  53. Licensed using the `MIT license <http://opensource.org/licenses/MIT>`_.
  54. Copyright (c) 2015 Michael Dowling <https://github.com/mtdowling>
  55. Permission is hereby granted, free of charge, to any person obtaining a copy
  56. of this software and associated documentation files (the "Software"), to deal
  57. in the Software without restriction, including without limitation the rights
  58. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  59. copies of the Software, and to permit persons to whom the Software is
  60. furnished to do so, subject to the following conditions:
  61. The above copyright notice and this permission notice shall be included in
  62. all copies or substantial portions of the Software.
  63. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  64. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  65. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  66. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  67. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  68. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  69. THE SOFTWARE.
  70. Contributing
  71. ============
  72. Guidelines
  73. ----------
  74. 1. Guzzle utilizes PSR-1, PSR-2, PSR-4, and PSR-7.
  75. 2. Guzzle is meant to be lean and fast with very few dependencies. This means
  76. that not every feature request will be accepted.
  77. 3. Guzzle has a minimum PHP version requirement of PHP 5.5. Pull requests must
  78. not require a PHP version greater than PHP 5.5 unless the feature is only
  79. utilized conditionally.
  80. 4. All pull requests must include unit tests to ensure the change works as
  81. expected and to prevent regressions.
  82. Running the tests
  83. -----------------
  84. In order to contribute, you'll need to checkout the source from GitHub and
  85. install Guzzle's dependencies using Composer:
  86. .. code-block:: bash
  87. git clone https://github.com/guzzle/guzzle.git
  88. cd guzzle && curl -s http://getcomposer.org/installer | php && ./composer.phar install --dev
  89. Guzzle is unit tested with PHPUnit. Run the tests using the Makefile:
  90. .. code-block:: bash
  91. make test
  92. .. note::
  93. You'll need to install node.js v0.5.0 or newer in order to perform
  94. integration tests on Guzzle's HTTP handlers.
  95. Reporting a security vulnerability
  96. ==================================
  97. We want to ensure that Guzzle is a secure HTTP client library for everyone. If
  98. you've discovered a security vulnerability in Guzzle, we appreciate your help
  99. in disclosing it to us in a `responsible manner <http://en.wikipedia.org/wiki/Responsible_disclosure>`_.
  100. Publicly disclosing a vulnerability can put the entire community at risk. If
  101. you've discovered a security concern, please email us at
  102. security@guzzlephp.org. We'll work with you to make sure that we understand the
  103. scope of the issue, and that we fully address your concern. We consider
  104. correspondence sent to security@guzzlephp.org our highest priority, and work to
  105. address any issues that arise as quickly as possible.
  106. After a security vulnerability has been corrected, a security hotfix release will
  107. be deployed as soon as possible.