overview.rst 5.1 KB

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