Problem/Motivation

Drupal\Core\DrupalKernelInterface::prepareLegacyRequest() is documented this way:

  /**
   * Prepare the kernel for handling a request without handling the request.
   *
   * @param \Symfony\Component\HttpFoundation\Request $request
   *   The current request.
   *
   * @return $this
   *
   * @deprecated 8.x
   *   Only used by legacy front-controller scripts.
   */
  public function prepareLegacyRequest(Request $request);

We're supposed to be saying when @deprecated code is to be deprecated.

Proposed resolution

  • Figure out if this method is deprecated.
  • Figure out when it's supposed to be removed.
  • Patch the doc block to say when it's supposed to be removed.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#4 2556273_4.patch602 bytesMile23
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Mile23 created an issue. See original summary.

Mile23’s picture

moshe weitzman’s picture

Drush uses this function, but we can easily stop using it. Feel free to remove from my perspective.

Mile23’s picture

Status: Active » Needs review
Issue tags: +rc target triage
FileSize
602 bytes

Since we're in RC let's mark this deprecated for removal before 9.

xjm’s picture

Title: Determine @deprecation of Drupal\Core\DrupalKernelInterface::prepareLegacyRequest() » Fix @deprecation docs of Drupal\Core\DrupalKernelInterface::prepareLegacyRequest()
Category: Bug report » Task
Issue tags: -rc target triage +rc eligible

Thanks @Mile23. Those docs look good to me, though since I'm unfamiliar with it I'll leave for someone else to RTBC.

Since this is essentially just a docs fix, it can be marked rc eligible (meaning it can go in during the RC phase without needing triage). Reference: https://www.drupal.org/core/d8-allowed-changes#rc So tagging as that. Thanks!

aishakadams’s picture

Status: Needs review » Reviewed & tested by the community

This patch performs as expected and was applied successfully (Mentor credit given to @mparker17).

mradcliffe’s picture

Status: Reviewed & tested by the community » Needs work

The parent issue mentions this:

For each function, either:
- add 'will be removed before Drupal 8.0' and replacement information to the docblock; or
- remove the @deprecated tag.

I trust Mile23's patch since he documented the issue, but am confused why it's 8.0.x and not 8.0. I think that an @see would help find the legacy front controller that are the only usage of this function. At the moment it is not clear to me how to find those classes.

Mile23’s picture

Status: Needs work » Needs review

It's easier to say 8.0.x and be right than it is to say 8.0 and be right, since we don't know when the patch will be applied.

Mile23’s picture

@mradcliffe: If that's satisfactory, could you please RTBC?

mradcliffe’s picture

Status: Needs review » Reviewed & tested by the community

Okay, the explanation in #6 works for me.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 4: 2556273_4.patch, failed testing.

AjitS’s picture

Status: Needs work » Reviewed & tested by the community

Looks like a random test failure.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.1.x and cherry-picked to 8.0.x. Thanks!

  • catch committed dda09df on 8.1.x
    Issue #2556273 by Mile23: Fix @deprecation docs of Drupal\Core\...

  • catch committed 9646b67 on
    Issue #2556273 by Mile23: Fix @deprecation docs of Drupal\Core\...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.