\Drupal\Core\Theme\ThemeInitialization declares $moduleHandler dynamically.
Declare it as a property of the class.

CommentFileSizeAuthor
#2 2914595-2.patch600 bytes_gradient_
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

penyaskito created an issue. See original summary.

_gradient_’s picture

penyaskito’s picture

Status: Active » Reviewed & tested by the community

RTBC if passes.
There is no need for adding tests in this issue, as it's a task and not a bug.

Thanks!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Potentially there might be an issue if someone is accessing this property from outside the ThemeInitialization service. As it currently is the equivalent of a public property. But if so they really are not doing it right. Since the module handler is a service they really should be getting it injected. So let's go forward with this in 8.5.x. This was just a mistake introduced in #2389735: Core and base theme CSS files in libraries override theme CSS files with the same name

Committed 5a8337c and pushed to 8.5.x. Thanks!

  • alexpott committed 5a8337c on 8.5.x
    Issue #2914595 by _gradient_: \Drupal\Core\Theme\ThemeInitialization...

Status: Fixed » Closed (fixed)

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