===== Installing PhD =====
The preferred method is using the pear channel, but all methods are documented below.
==== Using the PEAR Channel ====
At the time of this writing the latest version of PhD is in beta so the -beta tag is used below.
PhD is chunked into multiple sub-packages (currently "Generic", "PHP" and "PEAR"), the Generic package is installed by default.
To install just the PhD core and the Generic package, type:
$ pear install doc.php.net/PhD
And for upgrading:
$ pear upgrade doc.php.net/PhD
If by chance you already installed PhD by other means then be sure to uninstall that version first.
To list all available packages:
$ pear remote-list -c doc.php.net
and to install optional packages:
$ pear install doc.php.net/PhD_PHP
$ pear install doc.php.net/PhD_IDE
Note that since the optional packages depend on the PhD core package they will pull down and automatically install the required packages if missing. That means it enough to simply write:
$ pear install doc.php.net/PhD_PHP
to install everything that is required.
==== Using PEAR directly ====
Installing by using a specific tarball is possible too, but is not recommended.
$ pear install http://doc.php.net/get/PhD-1.1.0.tgz
==== Using GIT ====
NOTE: Using PhD from GIT is not recommended.
Getting the code (anonymous checkout):
$ git clone git://git.php.net/phd.git
For developers:
$ git clone git@git.php.net:/phd.git
Install and run from GIT. There are several package_*.xml files, but in the very least you'll need:
$ cd phd
$ pear install package.xml package_generic.xml
To then install the "PHP" package (needed to render the PHP documentations):
$ pear install package_php.xml
Alternately you can run PhD directly from GIT, without needing to install it. The same holds true if using the tarball, because all the phd command really does is execute "php render.php" so:
$ cd phd
$ php render.php --docbook /path/to/phpdoc/.manual.xml
Now go on and read the [[http://doc.php.net/phd/docs/|PhD Documentation]]