Composer is an open source dependency manager for PHP.
It is a powerful tool for PHP developers which simplifies this process by allowing you to declare, install and manages the packages or libraries in your PHP project depends on.
This article will guide the simple steps to install Composer on your Windows machine.
Table of Contents
What is Dependency Manager?
A dependency manager can be defined as a software tool to manage (install, upgrade, configure, and remove) the various types of packages or libraries required by a project in a logical and meaningful way.
What is PHP Composer?
Composer is a powerful tool for PHP developers, simplifies this process by allowing you to declare and manages the packages or libraries your project depends on.
Pre-requisites
Composer requires PHP to run on your system. You can check installing XAMPP here.
Open command prompt and run below command to check the installed PHP version.
php -v
Installing Composer
This step-by-step guide will walk you through the process of installing Composer on your Windows.
Download Composer
Visit the Composer official website.
You can download Composer using this download link and download the Windows Installer.
Run the Installer
Locate the downloaded Composer installer file (Composer-Setup.exe) and double-click it to begin the installation process.
Installation Options
Select Developer mode it will automatically select the installed PHP path. Click “Next” to continue.
Installation Folder Location
Select the installation folder where you want to install Composer. By default, Composer installs to “C:\composer” location. Click “Next” to continue.
Settings Check for PHP
Select the installed PHP version path for php.exe to configure with the composer. Click “Next” to continue.
Ready to Install
Follow the rest of instructions of the setup process. Click “Next” to continue.
Review your settings, and if everything looks good, click “Install” to start the installation.
Click “Next” to finish installation.
Complete Installation
Once the installation completes, click “Finish“.
Verify the Composer Installation
Composer is now installed globally and it can be used from anywhere.
Open command prompt and run below command to check the installed Composer version.
composer
Composer is now installed globally on your Windows system. You can use it to manage dependencies for your PHP projects. Composer’s ability to handle package installations, upgradations, deletions, autoloading, and version management makes it an indispensable tool for modern PHP development.