Extract DrupalKernel::bootEnvironment into SAPI adapter

Created on 18 March 2016, about 9 years ago
Updated 6 October 2023, over 1 year ago

Problem/Motivation

DrupalKernel::bootEnvironment is responsible for setting up some important values in global scope before the kernel is booted. This pre-boot setup must only be performed once throughout a request. However, the application kernel is instantiated and booted repeatedly during tests. In order to protect against reinitialization, bookEnvironment maintains a static flag on DrupalKernel.

Closer inspection of bootEnvironment suggests that a large part of the code only makes sense when running as web application. It looks like delegating the responsibility of bootEnvironment might make it easier to adapt DrupalKernel to execution environments other than web servers.

Proposed resolution

Extract DrupalKernel::bootEnvironment into a set of classes under the namespace \Drupal\Core\SAPI and separate code paths for CLI and web SAPIs.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Closed: duplicate

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated about 1 hour ago

Created by

πŸ‡¨πŸ‡­Switzerland znerol

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