Wednesday, May 3, 2017

How to install composer on Lubuntu 16.04

install composer

Composer is dependency tool for php, there are many php framework and libraries that can be install using composer, so i think composer is a must have for php developer. In this short tutorial i will show you how to install composer on lubuntu 16.04.

On lubuntu 16.04, composer seems to be part of the official repository, so basically you can install composer using apt-get command like this:
sudo apt-get install composer
In the old days you need to download composer manually using curl, but now on lubuntu/ubuntu 16.04 installing composer using apt-get command works.

Once installed you can start running composer command, here's some of the commands that you can use with composer:



CommandFunction
dump-autoload Dumps the autoloader
init Creates a basic composer.json file in current directory.
install Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json
require Adds required packages to your composer.json and installs them
update Updates your dependencies to the latest version according to composer.json, and updates the composer.lock file.






No comments:

Post a Comment