Make Drupal core folder agnostic and allow it to be placed in vendor/drupal/core

Created on 2 December 2014, over 10 years ago
Updated 21 May 2025, 1 day ago

Problem/Motivation

Drupal core currently is forced to be in the core directory inside of the webroot. This means that an admin is forced to use Composer Installers if they want to install Drupal core with composer. This also presents a potential security hazard as all of Drupal core's code must be in the web-root.

Proposed resolution

Make Drupal core folder agnostic like Symfony and Laravel Framework. This allows admins to use Drupal core as if it were any other dependency of their project. Thereby giving Drupal admins and immense amount of flexability to mix-and-match Drupal core with other dependencies.

Remaining tasks

We'll need to deal with the front-end assets, since we don't want to serve those directly from vendor. Perhaps the various caching layers can take care of this for us.

API changes

Every part of Drupal that is "aware" of the folder it is in, will need to be re-worked to not be. Since we are already using Composer's Autoloader, some of this has already been done, but there's still a lot of legacy systems that are required to be in the core directory and must be aware of the web-root.

Also, this might require some sort of "Kernal" to load contrib modules, or we could force contrib to use Composer. :)

🌱 Plan
Status

Active

Version

11.0 πŸ”₯

Component

base system

Created by

πŸ‡ΊπŸ‡ΈUnited States davidwbarratt

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024