Needs work
Project:
Drupal core
Version:
main
Component:
routing system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Apr 2026 at 22:03 UTC
Updated:
4 Jul 2026 at 15:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #4
longwaveFirst pass, incorporating #3582628: Add a generic way of scanning classes for attributes. SystemController has a *lot* of attributes now, which seems a bit weird, but it's the most complex case by far.
Comment #5
longwaveOne thing I should explicitly call out: in most cases the menu link title is the same as the default route title, so we take
titlefrom the route'sdefaults._titleproperty if the menu link didn't explicitly set one.I do wonder if we should somehow promote
defaults._titleto a top level property on the Route attribute, as it would make it all a lot easier to read.Comment #6
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. 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 #7
aaronmchaleYes! If only because now that routes can be defined via attributes, the more things that are top-level keys the more we benefit from those things being discoverable by IDEs, etc. And title is probably one of the most common keys to be defined in a route.
Comment #8
godotislateI think we'd need our own Route attribute to do that?
Comment #9
aaronmchaleOh yeah that's a really good point
Comment #10
longwaveCould we extend the Symfony one and juggle the parameters in the constructor?
Comment #11
godotislateYes, that should be pretty easy to do. In that case, we probably want to consider other top level properties we want, if any, and add them all at once. That way we reduce the need of introducing new ones later and potentially causing confusion/fatal errors on missing named parameters.
Comment #12
godotislateIssue to promote title to top level: #3607968: Promote defaults._title to top level in route attributes.