Question

I'm new to Zend Framework 2.0, after reading the documentation I know that we can install Zend via some package managers as Pyrus, Composer. But I don't know which package manager should I choose? Please explain to me some differences between them, thank you for help!

Was it helpful?

Solution

Pyrus is basically PEAR2, and needs the end developer of a package to configure a pyrus distribution channel to make packages public.

Composer is backed by the main packagist.org repository, with the availability of own channels through satis if necessary.

Pyrus is mantained, but has not much activity on its main repository, composer is much more active.

Composer is the most used package manager for PHP currently available. Most ZF2 modules currently support it and don't support Pyrus, so I strongly suggest you to get used to it.

Related: ZF2 + doctrine without composer (an example of how this tool is becoming necessary).

OTHER TIPS

In addition to Ocramius' explanation:

  • Pyrus is not PEAR2. Pyrus is a standalone tool that can install packages from any PEAR-compatible channel, including pear.php.net and pear2.php.net.
  • Pyrus is able to install and compile PECL packages (PHP extensions).
  • Publishing a package yourself is easier with composer. You only need one single file in your git repository; Composer can install directly from there. Pyrus on the other hand needs a bunch of XML files you can't hand-generate - so you have to use a channel server software like Pirum.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top