Problem/Motivation

Invoking the module handler early, e.g. in the constructor of a service, can have bad side effects: #3207813: ModuleHandler skips all hook implementations when invoked before the module files have been loaded. Also, it's generally recommended to keep constructors as simple as possible when using dependency injection.

Proposed resolution

Inject the module handler into a property and load the dictionary on demand.

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

dieterholvoet created an issue. See original summary.

dieterholvoet’s picture

Issue summary: View changes

dieterholvoet’s picture

Status: Active » Needs review
prudloff’s picture

Status: Needs review » Needs work

The MR has conflicts.

dieterholvoet’s picture

Status: Needs work » Needs review
prudloff’s picture

Status: Needs review » Fixed

Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.