Please help us update it! We pay for new and updated articles.
See Vultr's Request for Article (RFA) System for details and include RFA# 1063 in your request.
Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.
In this tutorial, we will be outlining the process of installing Composer globally on Debian Linux.
The Composer installer is a single PHP Script, which makes the process quick and easy. Below are the steps to follow in order to install Composer:
cd /usr/src curl -sS https://getcomposer.org/installer -o composer-setup.php php composer-setup.php --install-dir=/usr/local/bin --filename=composer
You can test Composer by running the command below: composer --version
You can also test Composer's functionality by creating a sample Laravel location in your current directory using the command below:
composer create-project --prefer-dist laravel/laravel test
As a result of running the above command, a directory named
testshould be created. To ensure that Composer worked as intended, navigate to the directory and confirm that it isn't empty.
This concludes our tutorial, thank you for reading.