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.
Follow up to:
#1606794: Implement new routing system
#1786460: Add the lock API to the DIC
The MatcherDumper class needs to be adjusted to use the locking framework to avoid race conditions on rebuild. That must be done via pure injection so that the MatcherDumper is still unit testable.
Comment | File | Size | Author |
---|---|---|---|
#10 | router-builder-lock-1798222-10.patch | 3.65 KB | Berdir |
#10 | router-builder-lock-1798222-10-interdiff.txt | 891 bytes | Berdir |
#6 | router-rebuild-lock-1798222-6.patch | 2.78 KB | Berdir |
Comments
Comment #1
Crell CreditAttribution: Crell commentedPer catch's request.
Comment #2
sunComment #3
catchNo reason to postpone this. Also #1642062: Add TempStore for persistent, limited-term storage of non-cache data adds the lock system to the DIC.
Comment #4
BerdirAnd it has been commited now, so even less reasons to postpone it :)
Comment #5
BerdirI actually have an almost finished patch for this.
Comment #6
BerdirShould be something like this I guess?
Passes the lock into the service, implementation is taken from menu_rebuild and adjusted.
Edit: Accidental double upload, it's the same file.
Comment #8
Crell CreditAttribution: Crell commentedThat looks right to me visually. No idea why testbot disagrees.
Comment #9
BerdirUpgrade tests. I guess we have a another service definition of router.builder in update.php which needs to be updated as well.
Comment #10
BerdirThis should fix the tests.
Comment #11
Crell CreditAttribution: Crell commentedSo it does.
Comment #12
webchickPatch looks consistent with what we do in menu.inc in D7 today.
Committed and pushed to 8.x. Thanks!
Comment #13.0
(not verified) CreditAttribution: commentedUpdated issue summary.