Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294288

Remove DrupalKernel::initializeRequestGlobals and replace base_root, base_url and base_path with a service

$
0
0

Problem/Motivation

The global variables base_url, base_path and base_root as well as the base_path() function are still used throughout core. Removal of those is tricky, since there is no direct replacement on the Symfony request object for those. The globals in Drupal are always relative to the application directory, while Symfony $request->getBaseUrl() returns the base URL relative to the front controller.

For example when running the installer (hxxp://example.com/drupal/core/install.php), Symfony will report the base URL including the core path, while $base_url will only be up to drupal.

Proposed resolution

Since there is no direct replacement in Symfony, it is necessary to introduce an additional service which is capable of returning the base URL and the base path relative to the application (not the front controller).

Remaining tasks

User interface changes

API changes

Data model changes


Viewing all articles
Browse latest Browse all 294288

Trending Articles