INTEREST JOURNAL DRUPAL & WEB

Drupal Guide in Detail: 3.6 Managing Files and Dependencies with Composer

About 500 words 3 min read

Japanese ↗
On this page

Detailed guide. An unofficial adaptation of User Guide 3.6. Source updated April 14, 2025; reviewed November 6, 2026. No running-Drupal procedure test has been performed.

Official source ↗ · Previous: 3.5 Setting Up an Environment with DDEV · Chapter 3 overview · Next: 3.7 Running the Interactive Installer

Goal

Use Composer for files and dependencies, distinct from database initialization or enabling Drupal features. Review 3.3 and ensure Composer is available.

Download new core files

The source illustrates creating a new project from its parent directory:

composer create-project drupal/recommended-project mydir

Distinguish project root mydir from document root mydir/web. This example does not fix a branch; choose compatible release requirements first and do not create over an existing site.

Download an extension

The source’s Geofield example, from a Composer-managed project root:

composer require drupal/geofield

Downloading files is separate from enabling the feature in Drupal. Check project compatibility.

Update versus reproduce

The source includes extension update and historical version examples; old numbers are not current recommendations. Composer documentation distinguishes installing locked versions from resolving updates. Keep JSON, lock, vendor files and autoloading consistent.

Core-update qualification

The official core-update guide ↗ gives this example for core-recommended:

composer update "drupal/core-*" --with-all-dependencies

Other project structures differ. This is not a complete update procedure; review backup, database updates, caches and status checks in the update summary and original instructions. No command was executed here.

Our verification example

Record JSON/lock changes, installed package versions, platform requirements and Drupal status. Do not turn the source’s transfer discussion into unconditional directory deletion; verify coherent build and recovery procedures.

Update note: templates and bootstrapping

11.4.0 ↗ introduces Symfony Runtime and deprecates legacy-project. Use recommended-project for new builds and review custom front controllers. The release notes say existing controllers continue working until at least Drupal 12; this is not an immediate blanket rewrite instruction.

Existing chapter note .

Sources, credits and changes

Source: Drupal User Guide 3.6 ↗ . Contributors and source links listed in its Attributions: Jennifer Hodgdon ↗ · Hans Fredrik Nordhaug ↗ · Joe Shindelar ↗ · Drupalize.Me · “Using Composer to manage Drupal site dependencies” ↗ · Drupal Community Documentation ↗ . Refer to the source for writing, editing and adaptation roles, and to the guide-wide credits ↗ .

Copyright remains with the individual contributors; the official copyright page ↗ states © 2015–2025. Changes include reorganized explanations and procedures, our preparation and verification examples, troubleshooting notes, source-interpretation qualifications and release references. Original screenshots and videos are not reproduced. This adapted text is shared under CC BY-SA 2.0 . It is not an official edition or endorsement. This notice does not license unrelated articles or the site design.

Previous: 3.5 Setting Up an Environment with DDEV · Chapter 3 overview · Next: 3.7 Running the Interactive Installer

Chapter 2 details · Chapter 4 · All chapters · Search official information

Back to chapter contents ↗