Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By RobLoach on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Issue links:
Description:
Composer is a dependency management tool for PHP which Drupal 8 has adopted it to handle its PHP dependencies, such as Symfony and Twig. You will find composer.json available at /composer.json, which follows a schema in order to define the version dependencies for each required package.
Installation
To install Composer, you can install Drush Composer using the follwing command:
drush dl composer
Alternatively, you can install Composer using straight-up PHP:
curl -s https://getcomposer.org/installer | php
Usage
Once you have Composer installed, you can update /composer.json accordingly, and run:
cd core
drush composer update
Composer will retrieve new package information and update all the dependencies.