Problem/Motivation
Untangle interdependencies of ResponsiveImageStyle from Breakpoints (more specifically breakpoint manager). Identified around #3267870-54: Order image mappings by breakpoint ID and numeric multiplier and the next few comments.
Steps to reproduce
\Drupal::service('breakpoint.manager')->getBreakpointsByGroup($this->getBreakpointGroup());
Calling out to the service of another module directly from the entity class is a bit strange, but unless we only do this on save (in which case it could happen in the presave hook) I don't see another way.
To add more the debate, calling \Drupal::service('breakpoint.manager') _already_ happens in calculateDependencies. If we want to remove that DI failure, I think we need to open a follow-up to see how we can untangle the required dependencies between breakpoints and responsive images.
Comments