It's easy to manage the components of your PHP projects with the open-source Composer tool, as Jefersson Nathan de O. Chaves explains.

Managing your project’s dependencies with Composer

Composer is a manager of dependencies written in PHP and distributed in a form of a binary phar package. Simple and fast, with a low learning curve – and a few practical features –it has gained prominence in a short period of time.

If you find yourself working on a project that depends on libraries which themselves depend on more libraries, you may find Composer suitable for use.

I know what you’re thinking: „Another tool to learn? I don’t have patience for this!”. Don’t worry, though – learning the basics of Composer doesn’t take a minute, and is well worth it.

Why choose Composer?

One of the many things that made me adopt Composer as my main tool for managing dependences is its ease of dealing with CMSes and Frameworks such as WordPress, CakePHP, Joomla!, among others.

One cool feature of Composer is that you can delegate it the task of carrying your classes with an auto-load system built under the PSR-0 specification. To do so, we have to move the appropriate data to Composer so it can process and manage the entire project.

This is just a preview – to read the rest of the article, download your free copy of Web & PHP Magazine.

Unsere Redaktion empfiehlt:

Relevante Beiträge

Meinungen zu diesem Beitrag

- Gib Deinen Standort ein -
- or -