Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
routing system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Mar 2021 at 18:42 UTC
Updated:
18 Mar 2026 at 19:05 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
hchonovComment #3
hchonovComment #6
hchonovAn example of one of the possible use cases is the following module that requires this feature: https://www.drupal.org/project/decoupled_routes
Comment #9
smustgrave commentedThis issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.
This could use a test case to show the issue.
Comment #12
dieterholvoet commentedThis change could mean a big performance improvement in the Domain module: #3232343: DomainSourcePathProcessor is resource intensive.
I started a MR with the changes from the patch. I also added
route_parametersto the$optionsarray, we need that to extract entity information from the URL.Comment #15
riyas_nr commentedAdded test coverage for adding
route_nameandroute_parametersto the$optionsarray inUrlGenerator::generateFromRoute(). Moving to NR.Comment #16
mably commentedThis is a must have.
As said above by @dieterholvoet, without access to the those
route_nameandroute_parametersoptions, we have to useUrl::fromUserInputin theDomainSourcePathProcessorof the Domain module and it causes a significant performance issue (besides some annoying loops).And using the Route Provider or Router in a path processor service creates some circular dependency problems.
Comment #17
nebel54The patch is looking good and working as expected.
Comment #18
astonvictor commentedthe patch works for me
+1 RTBC
Comment #19
catchCommitted/pushed to 11.x, thanks!
Comment #26
catchHad to revert - test coverage here needs updating to use PHPUnit attributes instead of annotations.
Comment #28
mably commentedHi @catch, do you have any example of how it should be done?
EDIT: Just had to look to the other tests to find the solution.
Comment #29
mably commentedComment #30
idebr commentedMR shows a failure in the pipeline (probably unrelated, but I don't have the permission to re-run it), see https://git.drupalcode.org/issue/drupal-3202329/-/pipelines/644390/test_...
Comment #31
riyas_nr commentedComment #33
dcam commentedThe latest commit implements
@legacy-covers, the lack of which is what caused the pipeline failures after the MR was committed back in October. I rebased the MR and all of the up-to-date linting is passing. This is RTBC again.Comment #35
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #36
dcam commentedPost-bot-rebellion rebase
Comment #40
longwaveSecond time lucky, sorry this took so long to get back in.
Committed and pushed d590556a447 to main and 3439f06f917 to 11.x. Thanks!
Comment #43
mably commentedThanks @longwave! Happy to see this useful enhancement get merged.
Do you know if we will get this in 11.3 or 11.4?
Comment #44
longwaveCurrently 11.4, as features only arrive in minor versions. I guess it can't hurt to cherry-pick to 11.3 if it's useful there though?
Comment #45
mably commentedYes, it would definitely be useful in 11.3. But we can also wait for 11.4.