Skip to content
This repository was archived by the owner on Apr 1, 2023. It is now read-only.

Commit 5e419ac

Browse files
committed
minor #131 Add composer installation documentation (tombevers)
This PR was merged into the 1.0-dev branch. Discussion ---------- Add composer installation documentation This adds information to the documentation regarding installing Goutte via composer. Commits ------- 9a9b9f8 Add composer installation documentation
2 parents cdafd57 + 9a9b9f8 commit 5e419ac

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

README.rst

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,41 @@ Requirements
1111

1212
Goutte works with PHP 5.3.3 or later.
1313

14-
Installation
15-
------------
14+
Installing via Composer
15+
-----------------------
16+
17+
The recommended way to install Goutte is through `Composer`_.
18+
19+
.. code-block:: bash
20+
21+
# Install Composer
22+
curl -sS https://getcomposer.org/installer | php
23+
24+
# Add Goutte as a dependency
25+
php composer.phar require fabpot/goutte:~1.0
26+
27+
After installing, you need to require Composer's autoloader:
28+
29+
.. code-block:: php
30+
31+
require 'vendor/autoload.php';
32+
33+
Installing via Phar
34+
-------------------
1635

1736
Installing Goutte is as easy as it can get. Download the `Goutte.phar`_ file
1837
and you're done!
1938

20-
Usage
21-
-----
2239

2340
Require the Goutte phar file to use Goutte in a script:
2441

2542
.. code-block:: php
2643
2744
require_once '/path/to/goutte.phar';
2845
46+
Usage
47+
-----
48+
2949
Create a Goutte Client instance (which extends
3050
``Symfony\Component\BrowserKit\Client``):
3151

@@ -95,5 +115,6 @@ License
95115

96116
Goutte is licensed under the MIT license.
97117

118+
.. _`Composer`: http://getcomposer.org
98119
.. _`Goutte.phar`: http://get.sensiolabs.org/goutte.phar
99120
.. _`Guzzle`: http://docs.guzzlephp.org

0 commit comments

Comments
 (0)