Skip to content

Commit 9c1958f

Browse files
Clean up installation instructions
1 parent f222044 commit 9c1958f

File tree

2 files changed

+125
-231
lines changed

2 files changed

+125
-231
lines changed

src/3.7/en/installation.xml

Lines changed: 62 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -3,74 +3,39 @@
33
<chapter id="installation">
44
<title>Installing PHPUnit</title>
55

6-
<para>
7-
There a three supported ways of installing PHPUnit. You can use the <ulink
8-
url="http://pear.php.net/manual/en/guide.users.commandline.cli.php">PEAR
9-
Installer</ulink> or <ulink url="http://getcomposer.org/">Composer</ulink>
10-
to download and install PHPUnit as well as its dependencies. You can also
11-
download a <ulink url="http://php.net/phar">PHP Archive (PHAR)</ulink> of
12-
PHPUnit that has all required (as well as some optional) dependencies of
13-
PHPUnit bundled in a single file.
14-
</para>
15-
16-
<note>
17-
<para>
18-
Support for Composer and PHP Archive (PHAR) was added in PHPUnit 3.7 (and
19-
is known to be stable since PHPUnit 3.7.5). Earlier releases of PHPUnit
20-
are not available through these distribution channels.
21-
</para>
22-
</note>
23-
24-
<note>
25-
<para>
26-
PHPUnit 3.7 requires PHP 5.3.3 (or later) but PHP 5.4.7 (or later) is
27-
highly recommended.
28-
</para>
6+
<section id="installation.phar">
7+
<title>PHP Archive (PHAR)</title>
298

309
<para>
31-
PHP_CodeCoverage, the library that is used by PHPUnit to collect and
32-
process code coverage information, depends on Xdebug 2.0.5 (or later) but
33-
Xdebug 2.2.0 (or later) is highly recommended.
10+
The easiest way to obtain PHPUnit is to download a <ulink
11+
url="http://php.net/phar">PHP Archive (PHAR)</ulink> that has all required
12+
(as well as some optional) dependencies of PHPUnit bundled in a single
13+
file:
3414
</para>
35-
</note>
3615

37-
<section id="installation.pear">
38-
<title>PEAR</title>
16+
<screen><userinput>wget http://pear.phpunit.de/get/phpunit.phar</userinput>
17+
<userinput>chmod +x phpunit.phar</userinput>
18+
<userinput>mv phpunit.phar /usr/local/bin/phpunit</userinput></screen>
3919

4020
<para>
41-
The following two commands (which you may have to run as
42-
<literal>root</literal>) are all that is required to install PHPUnit using
43-
the PEAR Installer:
21+
You can also immediately use the PHAR after you have downloaded it, of
22+
course:
4423
</para>
4524

46-
<screen><userinput>pear config-set auto_discover 1</userinput>
47-
<userinput>pear install pear.phpunit.de/PHPUnit</userinput></screen>
48-
49-
<caution>
50-
<para>
51-
Depending on your OS distribution and/or your PHP environment, you may
52-
need to install PEAR or update your existing PEAR installation before
53-
you can proceed with the instructions in this section.
54-
</para>
55-
56-
<para>
57-
<userinput>sudo pear upgrade PEAR</userinput> usually suffices to
58-
upgrade an existing PEAR installation. The <ulink
59-
url="http://pear.php.net/manual/en/installation.getting.php">PEAR Manual</ulink>
60-
explains how to perform a fresh installation of PEAR.
61-
</para>
62-
</caution>
25+
<screen><userinput>wget http://pear.phpunit.de/get/phpunit.phar</userinput>
26+
<userinput>php phpunit.phar</userinput></screen>
6327
</section>
6428

6529
<section id="installation.composer">
6630
<title>Composer</title>
6731

6832
<para>
69-
To add PHPUnit as a local, per-project dependency to your project, simply
70-
add a dependency on <literal>phpunit/phpunit</literal> to your project's
71-
<filename>composer.json</filename> file. Here is a minimal example of a
72-
<filename>composer.json</filename> file that just defines a
73-
development-time dependency on PHPUnit 3.7:
33+
Simply add a dependency on <literal>phpunit/phpunit</literal> to your
34+
project's <literal>composer.json</literal> file if you use
35+
<ulink url="http://getcomposer.org/">Composer</ulink> to manage the
36+
dependencies of your project. Here is a minimal example of a
37+
<literal>composer.json</literal> file that just defines a development-time
38+
dependency on PHPUnit 3.7:
7439
</para>
7540

7641
<programlisting><![CDATA[{
@@ -93,19 +58,55 @@
9358
"bin-dir": "/usr/local/bin/"
9459
}
9560
}]]></programlisting>
61+
62+
<note>
63+
<para>
64+
Support for Composer and PHP Archive (PHAR) was added in PHPUnit 3.7
65+
(and is known to be stable since PHPUnit 3.7.5). Earlier releases of
66+
PHPUnit are not available through these distribution channels.
67+
</para>
68+
</note>
9669
</section>
9770

98-
<section id="installation.phar">
99-
<title>PHP Archive (PHAR)</title>
71+
<section id="installation.pear">
72+
<title>PEAR</title>
10073

10174
<para>
102-
You can also download a PHP Archive (PHAR) of PHPUnit that has all
103-
required (as well as some optional) dependencies of PHPUnit bundled in a
104-
single file:
75+
The following two commands (which you may have to run as
76+
<literal>root</literal>) are all that is required to install PHPUnit using
77+
the <ulink url="http://pear.php.net/manual/en/guide.users.commandline.cli.php">PEAR Installer</ulink>:
10578
</para>
10679

107-
<screen><userinput>wget http://pear.phpunit.de/get/phpunit.phar</userinput>
108-
<userinput>chmod +x phpunit.phar</userinput></screen>
80+
<screen><userinput>pear config-set auto_discover 1</userinput>
81+
<userinput>pear install pear.phpunit.de/PHPUnit</userinput></screen>
82+
83+
<caution>
84+
<para>
85+
Depending on your OS distribution and/or your PHP environment, you may
86+
need to install PEAR or update your existing PEAR installation before
87+
you can proceed with the instructions in this section.
88+
</para>
89+
90+
<para>
91+
<userinput>sudo pear upgrade PEAR</userinput> usually suffices to
92+
upgrade an existing PEAR installation. The <ulink
93+
url="http://pear.php.net/manual/en/installation.getting.php">PEAR Manual</ulink>
94+
explains how to perform a fresh installation of PEAR.
95+
</para>
96+
</caution>
97+
98+
<note>
99+
<para>
100+
PHPUnit 3.7 requires PHP 5.3.3 (or later) but PHP 5.5.1 (or later) is
101+
highly recommended.
102+
</para>
103+
104+
<para>
105+
PHP_CodeCoverage, the library that is used by PHPUnit to collect and
106+
process code coverage information, depends on Xdebug 2.0.5 (or later)
107+
but Xdebug 2.2.3 (or later) is highly recommended.
108+
</para>
109+
</note>
109110
</section>
110111

111112
<section id="installation.optional-packages">

0 commit comments

Comments
 (0)