Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Updated: Comment 0
Problem/Motivation
Let's get rid of request attributes.
Proposed resolution
Move _view_argument_map to route options instead of attributes. Attributes are information derived from the request, while _view_argument_map is just metainformation on top of a route.
Move _view_argument_map from the 'defaults' information of view routes into the 'options' of the routes.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#1 | vdc_route_options-2227555-1.patch | 6.26 KB | dawehner |
Comments
Comment #1
dawehnerHere we go.
Comment #2
damiankloip CreditAttribution: damiankloip commentedLooks good to me. Looks like it needs an issue summary though.
Comment #3
dawehnerComment #4
xjmComment #5
dawehner/me gets so sad if people don't review small patches
Comment #6
dawehner.
Comment #7
dawehnerComment #8
tim.plunkettThis is a big improvement semantically, and its all internal anyway, so the extra verbosity is not a problem.
Comment #9
webchickSorry, I can't even begin to fathom how to read that new code, so passing this one onto alexpott.
If this kind of code is what #2124749: [meta] Stop using $request->attributes->get(MAGIC_KEY) as a public API is going to bring us all over, though, colour me concerned. :(
Comment #10
dawehnerWell, this usecase would never be used by any custom/contrib module besides view so I don't give a shit about what people consider as DX.
Comment #11
alexpottMakes sense to me - and yep this is not a dx issue since it is all internal to views. I agree with Tim this is much more semantically correct.
Committed 52da190 and pushed to 8.x. Thanks!