A free and open-source book on ZF3 for beginners


14.4. Registering the Module as a Composer Package

If you are writing a reusable module that you plan to make publicly available, you may want to publish the code of your module on GitHub and register it on Packagist.org catalogue as a Composer-installable package. This is absolutely free.

After you register the package, you will be able to add it as a dependency to your web application as follows (replace the vendor and package placeholders with your company and package names, respectively):

php composer.phar require vendor/package

Composer will download and install your module to the vendor directory, so you will be able to use it as any third-party module.


Top