I do not understand why someone need composer? [closed] I do not understand why someone need composer? [closed] php php

I do not understand why someone need composer? [closed]


Composer allows you to very easily install a multitude of software for your project without dealing with the details.

It allows the authors to use another library themselves without you having to deal with all the details.

For example, if you would want to manually install a library that requires to install two additional libraries in the correct version, with these libraries requiring one additional library each, and additionally you'd have to initialize the autoloading of all five libraries, this might be some task to tackle.

With Composer, you only require one library, and after that everything is done for you.

Additionally, it makes updating way easier for you. If your library has a bug that got fixed in a newer version, you simply update and see if your application still runs. You'd spend most of the time checking everything still runs - and barely any time updating. That's productive.

Yes, you can do it manually. But why? But I can understand that you can't see the advantage if you don't update software extensively or don't use plenty of libraries.


The nice thing about Composer is that handles downloading libraries for you all by itself. All you have to do is specify a list of the libraries you want and Composer does the rest.

These things you think are easy to do manually (updating library versions, including them in your project etc) are all done automatically by Composer. What do you think is easier for yourself and your dev team? Installing a bunch of libraries manually - or installing Composer, writing a single composer.json file and typing "php composer.phar update."

The biggest benefit of Composer is that it will automatically grab all libraries required by the library you want. Suppose you have a library A that needs B, and B needs C, and C needs D etc. Without Composer, you would have to do this yourself. And this takes time and risks error.

Let me know if you have more questions about Composer. It will save you a lot of problems in the long run.