Establishing a new codebase
The first step of creating a new Drupal application is creating the codebase. And, Drupal leverages Composer to manage its code, including provisioning a new codebase.
What is Composer?
Composer is a command-line tool used to manage code in a Drupal application. Composer is not just for Drupal. Drupal adopted Composer because it is used to manage code across many PHP-based projects. This is especially helpful to manage Drupal dependencies, like Symfony projects. And, it works natively with projects hosted on Drupal.org and thus can readily manage core and community projects.
Composer requires two primary constructs to function, a “composer.json” file and a “composer.lock” file. Applications are composed of various projects and those projects are, typically, managed by Git. A built application is basically a series of projects cloned at a specific commit. The project and commit-level metadata is stored in the composer...