Child of #2124749: [meta] Stop using $request->attributes->get(MAGIC_KEY) as a public API, but doesn't seem like a big enough deal to warrant blocking beta on, so setting as a beta target instead.

CommentFileSizeAuthor
clean_urls.patch3.09 KBeffulgentsia
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

effulgentsia’s picture

+++ b/core/lib/Drupal/Core/Routing/RequestHelper.php
@@ -128,4 +128,25 @@ public static function duplicate(Request $original_request, $uri, $method = 'GET
+  public static function isCleanUrl(Request $request) {

If someone has a better idea for where this function should live (e.g., do we need it to be a swappable service?), please suggest it.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community
+++ b/core/lib/Drupal/Core/Routing/RequestHelper.php
@@ -128,4 +128,25 @@ public static function duplicate(Request $original_request, $uri, $method = 'GET
+  public static function isCleanUrl(Request $request) {

I wonder whether it is okay to not put it onto the wrapper we had in the other issue (RequestAdapter or how it was called),
but this seems to be nice for now.

do we need it to be a swappable service?

I really don't think we need. First, it is not used in many places (so you could swap out the image style if really needed)
and much more important it is tight really hard to the logic a request has, which is not PHP anymore.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Seems sane.

Committed and pushed to 8.x. Thanks.

  • Commit 4945bae on 8.x by webchick:
    Issue #2238945 by effulgentsia: Remove the 'clean_urls' request...

Status: Fixed » Closed (fixed)

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