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