Hello friends,
Here we are with another tutorial on the installation and use of Composer on Ubuntu 20.04. So, let’s get going! Before getting into the installing part, let us first briefly brush you all up about what exactly is a composer and its main use.
Contents
Composer is a prevalent dependency manager in PHP. Composer enables you to specify the PHP libraries that your project is dependent on, and it pulls and manages all the libraries and dependencies by using the appropriate versions according to the requirements of your project. Composer can be used in all the latest PHP frameworks as for example Laravel, Symfony, Drupal, and Magento.
First, update the package manager cache
sudo apt-get update
Next, run the following command to install the required packages:
sudo apt-get install php-cli unzip zip
You will be prompted to confirm installation by typing Y and then ENTER.
cd ~ curl -sS https://getcomposer.org/installer -o composer-setup.php
To install composer globally, use the following command which will download and install Composer as a system-wide command named composer, under /usr/local/bin:
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
To check your installation, run:
composer
When a required package relies on a system library that is currently not installed on your server, you will get an error telling which requirement is missing:
composer require Vendor/Extension
Whenever you want to update your project dependencies to more recent versions, run the update command:
composer update
You can also update one or more specific libraries by specifying them like this:
composer update Vendor1/Extension1 Vendor2/Extension2
So, here we have demonstrated How To Install and Use a Composer on Ubuntu 20.04. Make sure to perform all the steps carefully for a smooth installation. You can also upgrade your Magento version with zero downtime and data loss by using our Magento Upgrade Service.
We will be glad to receive from you if there are any queries or doubts you have. Share this blog with your friends.
Happy Coding!
Hello Magento Friends, In today’s blog, I will explain How to Add Tooltip in Checkout…
MongoDB is a popular NoSQL database that offers flexibility and scalability when handling modern web…
In NodeJS, callbacks empower developers to execute asynchronous operations like reading files, handling requests, and…
Hello Magento Friends, In today’s blog, we will learn How to Show SKU in Order…
The "Buy Now" and "Add to Cart" buttons serve as the primary call-to-action (CTA) elements…
Hello Magento Friends, In Magento 2, the checkout process allows customers to choose multiple shipping…