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

Comments

valthebald created an issue. See original summary.

valthebald’s picture

Title: In PHP-FPM environment, enabling a module in using a 'configure' route leads to an error page » Remove Drupal\Core\EventSubscriber\RouterRebuildSubscriber
Category: Bug report » Task
Priority: Major » Normal
Status: Needs work » Active
dawehner’s picture

Status: Active » Postponed

I would honestly postpne that until we have fixed anything in that area.

zaurav’s picture

Removed core/lib/Drupal/Core/EventSubscriber/RouterRebuildSubscriber.php

valthebald’s picture

@dawehner: but RouterRebuildSubscriber is not used, how its removal depends on other issues?

dawehner’s picture

@dawehner: but RouterRebuildSubscriber is not used, how its removal depends on other issues?

Well, 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.

tim.plunkett’s picture

Status: Postponed » Reviewed & tested by the community

#356399: Optimize the route rebuilding process to rebuild on write added \Drupal\Core\Routing\RouteBuilder::destruct, so we definitely don't need this.

dawehner’s picture

The 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.

tim.plunkett’s picture

It's DestructableInterface, not __destruct. Not sure if that matters to you.

dawehner’s picture

OH I see, nevermind then!

  • catch committed 6722061 on 8.1.x
    Issue #2613400 by zaurav, valthebald, dawehner, tim.plunkett: Remove...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

xjm’s picture

Issue tags: -rc target triage