From 1ac7c580ade0b755bbe3c9924e2d60cb130e46a1 Mon Sep 17 00:00:00 2001 From: Sebastian Goettschkes Date: Tue, 4 Dec 2012 16:17:24 +0100 Subject: [PATCH] Updating pear description --- _posts/04-03-01-PEAR.md | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/_posts/04-03-01-PEAR.md b/_posts/04-03-01-PEAR.md index e0f0194..61d0ce4 100644 --- a/_posts/04-03-01-PEAR.md +++ b/_posts/04-03-01-PEAR.md @@ -4,6 +4,36 @@ isChild: true ## PEAR {#pear_title} -Another veteran package manager that many PHP developers enjoy is [PEAR][1]. It behaves much the same way, and is also worth researching for your projects. [Learn about PEAR][1]. +Another veteran package manager that many PHP developers enjoy is [PEAR][1]. It behaves much the same way as Composer, +but has some noteable differences. + +PEAR requires each package to have a specific structure, which means that the author of the package must prepare it +for usage with PEAR. Using a project which was not prepared to work with PEAR is not possible. + +PEAR installs packages globally, which means after installing them once they are available to all projects on that +server. This can be good if many projects rely on the same package with the same version but might lead to problems +if version conflicts between two projects arise. + +### How to install PEAR + +You can install PEAR by downloading the phar installer and executing it. The PEAR documentation has detailed +[install instructions][2] for every operating system. + +If you are using Linux, you can also have a look at your distribution package manager. Debian and Ubuntu for example +have a apt ``php-pear`` package. + +### How to install a package + +If the package is listed on the [PEAR packages list][3], you can install it by specifying the official name: + + pear install foo + +If the package is hosted on another channel, you need to `discover` the channel first and also specify it when +installing. See the [Using channel docs][4] for more information on this topic. + +* [Learn about PEAR][1] [1]: http://pear.php.net/ +[2]: http://pear.php.net/manual/en/installation.getting.php +[3]: http://pear.php.net/packages.php +[4]: http://pear.php.net/manual/en/guide.users.commandline.channels.php