Follow-up to #2564921: In PHP-FPM environment, enabling a module in using a 'configure' route leads to an error page
Problem/Motivation
Drupal\Core\EventSubscriber\RouterRebuildSubscriber exists in core, but is not used.
See #2564921: In PHP-FPM environment, enabling a module in using a 'configure' route leads to an error page how it was discovered.
There is a work #2589967: Rebuild routes immediately when modules are installed to immediately rebuild router instead of scheduling it, so this EventListener will not be needed
Proposed resolutions
- Remove the code
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | Core-RemovedUnneccesaryFile-2613400-0-8.0.x.patch | 1.61 KB | zaurav |
Comments
Comment #2
valthebaldComment #3
valthebaldShould be eligible for rc as followup of rc target #2572293: Race condition triggerable by a single user due to router rebuild in kernel.terminate
Comment #4
dawehnerI would honestly postpne that until we have fixed anything in that area.
Comment #5
zauravRemoved core/lib/Drupal/Core/EventSubscriber/RouterRebuildSubscriber.php
Comment #6
valthebald@dawehner: but RouterRebuildSubscriber is not used, how its removal depends on other issues?
Comment #7
dawehnerWell, it was intended to be there and work. Its just an implementation detail at the moment IMHO that not running it doesn't cause a bug.
Comment #8
tim.plunkett#356399: Optimize the route rebuilding process to rebuild on write added \Drupal\Core\Routing\RouteBuilder::destruct, so we definitely don't need this.
Comment #9
dawehnerThe reason why I'm not comfortable with relying on ::destruct() is that it feels like we have less control over when the destructor is fired vs. the terminate event.
Comment #10
tim.plunkettIt's DestructableInterface, not __destruct. Not sure if that matters to you.
Comment #11
dawehnerOH I see, nevermind then!
Comment #13
catchCommitted/pushed to 8.1.x, thanks!
While completely removing a class would normally be an API change, given this is an event subscriber the chance of someone extending it is as close to zero as it could possibly be.
Comment #15
xjm