Problem/Motivation

We call hook_modules_installed() after the route rebuild in the ModuleInstaller. This causes problems for the trash module when fixing a bug - see #3496091: Improve the way we enable Trash support by default for nodes.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3496588

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review

Let's see what breaks. This fixes #3496091: Improve the way we enable Trash support by default for nodes as expected.

alexpott’s picture

Nothing breaks... interesting. This looks like a sensible change to me but not sure. Here be dragons.

alexpott’s picture

Issue tags: +Needs tests

I think there is no reason when hook_modules_installed should come after the router rebuild. Note that if anything does use a route in hook_modules_installed the router will be rebuilt if necessary as this change would mean code would be using the lazy_builder route provider.

nicxvan’s picture

I think this makes sense, I'm not sure how we'd test this to be honest. I'd expect to not see the effects until contrib test runs go against it since core didn't trigger any failures.

smustgrave’s picture

Status: Needs review » Needs work

Not sure if trash is unique? But could it not be mimics from a test module?

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.