Allow specifying the environment for the kernel using an environment variables

Created on 10 May 2024, 6 months ago

Problem/Motivation

In the DrupalKernel we have an environment argument. However, it's always hardcoded to be prod:

$kernel = new DrupalKernel('prod', $autoloader);

It'd be better if we used an environment variable like other platforms:

$kernel = new DrupalKernel(getnev('APP_ENV') ?? 'prod', $autoloader);

Spun out of discussions in ✨ Making Drupal automatically installable with default environment variables Needs work .

Proposed resolution

Update index.php and document APP_ENV

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated 13 minutes ago

Created by

πŸ‡ΊπŸ‡ΈUnited States mglaman WI, USA

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

Comments & Activities

Production build 0.71.5 2024