Composer is nothing but a tool which is useful for dependencies management. Composer supports only 5.3.2+ version of PHP. Now a days most of the frameworks are using PHP composer. This idea comes from node's npm and bundler from ruby. You should be familiar with composer before using
zend,cake and magento etc. You can download the composer.phar in location /usr/local/bin/composer to set it globally or you can download it your project root folder.
curl -s https://getcomposer.org/installer | php
After that you need to create composer.json file to set the dependencies for your project. Many frameworks are providing inbuild modules for general purpose. You
can use the composer to download the modules files in vendor folder. You can simply update the composer using command
php composer.phar self-update
You can simply install the dependencies which is set in composer.json in root of your project. This is the command
php composer.phar install
Other question is raised that what is the need of it. We all knows day by day PHP is improved by their owners. New versions are launched by different framework
owners. Its all about the coding style.
Composer also provides autoload capabalities. You can autoload the specific files in your project to fullfil requirement.
0 Comment(s)