Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
As we realized on #1851086: Replace admin/people with a View is that overriding existing paths in views is problematic.
Therefore selecting routes by pattern is helpful to allow altering of existing views.
Proposed resolution
Extend the RouteProviderInterface which to include a getRouteByPattern method.
Remaining tasks
DO IT, WRITE TEST, HOPE IT ACTUALLY WORKS
User interface changes
NON
API changes
Extends the interface
Related Issues
Comment | File | Size | Author |
---|---|---|---|
#22 | routing-2004300-22.patch | 7.29 KB | dawehner |
#22 | interdiff.txt | 864 bytes | dawehner |
#18 | routing-2004300-18.patch | 7.21 KB | dawehner |
#18 | interdiff.txt | 977 bytes | dawehner |
#12 | interdiff.txt | 1007 bytes | dawehner |
Comments
Comment #1
dawehnerDo we agree so far on the interface?
Comment #2
Crell CreditAttribution: Crell commentedSeems reasonable. I might suggest not duplicating the interface name for clarity.
I presume then our implementation would then just subcall to that method from getRoutesByRequest(), since it would be all the same logic anyway. (That's what we discussed in Portland.)
Onward[s]!
Comment #3
dawehnerI introduced another protected method, which makes it even a bit cleaner.
Comment #5
Crell CreditAttribution: Crell commentedThis looks suspiciously like an infinite loop. :-)
$routes is a RouteCollection, not array, so assertFalse() isn't going to work. If you want to ensure that it's empty you can do a count($routes) == 0.
Comment #6
dawehnerComment #8
dawehner#6: drupal-2004300-6.patch queued for re-testing.
Comment #10
xjmClarifying why this is important. Views not being able to override routes is a critical regression.
Comment #11
dawehnerOh, I would have not thought that this could break it.
Comment #12
dawehnerHere is the interdiff.
Comment #14
tim.plunkett#11: routing-2004300-11.patch queued for re-testing.
Comment #16
dawehner#11: routing-2004300-11.patch queued for re-testing.
Comment #18
dawehnerOne less fail.
Comment #20
tim.plunkettThis needs a message, because assertEqual is trying to var_dump the object for the message
Comment #21
Crell CreditAttribution: Crell commentedThe user password reset seems spurious. I had it crop up weirdly in the entity uri issue, too, but couldn't replicate locally. Probably transient testbot weirdness.
Comment #22
dawehnerThanks tim!!
Comment #23
tim.plunkettNice, even better.
Comment #24
Crell CreditAttribution: Crell commented+1 from me as well.
Comment #25
alexpottCommitted c707cf7 and pushed to 8.x. Thanks!