Remove usages of deprecated DrupalKernel::prepareLegacyRequest()

Created on 13 April 2017, almost 8 years ago
Updated 7 June 2024, 10 months ago

Problem/Motivation

  /**
   * Prepare the kernel for handling a request without handling the request.
[..]
   * @deprecated in Drupal 8.0.x and will be removed before 9.0.0. Only used by
   *   legacy front-controller scripts.
  */

The one line summary is not useful information, and the deprecation message is not true (which is kind of hilarious: #2556273-4: Fix @deprecation docs of Drupal\Core\DrupalKernelInterface::prepareLegacyRequest() β†’ )

prepareLegacyRequest() is used extensively by the testing system.

It's also used by drupal_install_system() and drupal_rebuild().

Found 13 matches of prepareLegacyRequest in 11 files.	
authorize.php	
  $kernel->prepareLegacyRequest($request);      [position 68:12]	
install.core.inc	
  // \Drupal\Core\DrupalKernel::prepareLegacyRequest() since normal routing      [position 474:33]	
install.inc	
  $kernel->prepareLegacyRequest($request);      [position 619:12]	
utility.inc	
  $kernel->prepareLegacyRequest($request);      [position 43:12]	
DrupalKernel.php	
  public function prepareLegacyRequest(Request $request) {      [position 707:19]	
DrupalKernelInterface.php	
  public function prepareLegacyRequest(Request $request);      [position 128:19]	
FunctionalTestSetupTrait.php	
    $this->kernel->prepareLegacyRequest($request);      [position 389:20]	
    $this->kernel->prepareLegacyRequest(\Drupal::request());      [position 442:20]	
    //   DrupalKernel::prepareLegacyRequest() -> DrupalKernel::boot() but that      [position 446:24]	
InstallerTestBase.php	
      $this->kernel->prepareLegacyRequest($request);      [position 151:22]	
run-tests.sh	
  $kernel->prepareLegacyRequest($request);      [position 58:12]	
KernelTestBase.php	
    $kernel->prepareLegacyRequest($request);      [position 369:14]	
BrowserTestBase.php	
    $kernel->prepareLegacyRequest($request);      [position 1019:14]	

Proposed resolution

Remove the usages and replace them with calls to DrupalKernel::boot() and DrupalKernel::preHandle().

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Fixed

Version

8.8 ⚰️

Component
BaseΒ  β†’

Last updated 1 day ago

Created by

πŸ‡ΊπŸ‡ΈUnited States mile23 Seattle, WA

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