refactor: #3590337 Externalize app context from DrupalKernel to DrupalRuntime

The DrupalKernel has long been responsible for determining the application context (such as the app root and site URLs). However, different application types such as Drush or Drupal Console may have their own way of determining this context.

This commit replaces the app root argument for the DrupalKernel with a more elaborate AppContext class. This moves all of the discovery that DrupalKernel used to do, to the runtime class that's invoked through Symfony Runtime. This allows applications that want to provide this information differently to either swap out the runtime or use their own front-controller logic to instantiate the information class and pass it to the DrupalKernel.

This decouples the Drupal framework from its context.

Closes #3590337

Merge request reports

Loading