Part of #1998638: Replace almost all remaining superglobals ($_GET, $_POST, etc.) with Symfony Request object

Files needed to be changed are:

  • core/lib/Drupal/Core/Ajax/AjaxResponse.php
  • core/lib/Drupal/Core/Controller/ExceptionController.php
  • core/lib/Drupal/Core/Form/ConfirmFormBase.php
  • core/lib/Drupal/Core/Mail/PhpMail.php
  • core/lib/Drupal/Core/Utility/SchemaCache.php
  • core/lib/Drupal/Core/Utility/ThemeRegistry.php

Comments

mhagedon’s picture

Assigned: Unassigned » mhagedon
atchijov’s picture

sorry. have not see that it is taken.

mhagedon’s picture

Status: Active » Needs review
StatusFileSize
new5.07 KB

Here's an attempt to fix this. I used Drupal::request() a fair amount because it didn't appear that these classes were using DI. Suggestions to fix that are welcome. Also, AjaxResponse seemed clean of superglobals.

Status: Needs review » Needs work

The last submitted patch, drupal-use-symfony-request-for-core-classes-1998700-3.patch, failed testing.

mhagedon’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, drupal-use-symfony-request-for-core-classes-1998700-3.patch, failed testing.

atchijov’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, drupal-use-symfony-request-for-core-classes-1998700-3.patch, failed testing.

atchijov’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, drupal-use-symfony-request-for-core-classes-1998700-3.patch, failed testing.

atchijov’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, drupal-use-symfony-request-for-core-classes-1998700-3.patch, failed testing.

kim.pepper’s picture

Are you able to run these tests locally?

kim.pepper’s picture

Status: Needs work » Needs review
StatusFileSize
new6.1 KB
new4.7 KB

Cleaned up the patch using $request->isMethod('GET') as well as removing some temporary comments.

Status: Needs review » Needs work

The last submitted patch, 1998700-core-includes-request-14.patch, failed testing.

mhagedon’s picture

Odd... the change to isMethod() (good call BTW!) shouldn't have made the testbot able to log into the site. Maybe it was just overwhelmed by the volume of testing coming from DrupalCon?

I was (am) brand new to Drupal core development, so I didn't know how to run the tests at the time. I'm still not quite sure how I'd isolate these particular changes...

kim.pepper’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 1998700-core-includes-request-14.patch, failed testing.

kim.pepper’s picture

Status: Needs work » Needs review
StatusFileSize
new3.97 KB

Re-roll. Test failure in #14 passes locally.

Status: Needs review » Needs work

The last submitted patch, 1998700-core-includes-request-19.patch, failed testing.

kim.pepper’s picture

SearchBlockTest.php failures. Why am I not surprised?

kim.pepper’s picture

Status: Needs work » Needs review
StatusFileSize
new3.97 KB

Re-roll.

marcingy’s picture

Status: Needs review » Needs work

The last submitted patch, 1998700-core-includes-request-22.patch, failed testing.

kim.pepper’s picture

Issue tags: +Needs reroll

Needs reroll

kim.pepper’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new4 KB

Re-roll

marcingy’s picture

Status: Needs review » Reviewed & tested by the community

Looks good

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 66a1e0b and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Removed core/lib/Drupal/Component/Utility/Crypt.php, it's only using it for random data, not to actually reference the request context.