refactor: #3628876 Use dependency injection for image styles in video formatters

Inject the entity type manager in both video formatters and retrieve image-style storage when needed. Preserve existing options, summaries and settings.

Thanks for reviewing the recent MRs. These remaining dependency-injection findings were in the original CI reports. As the coding cleanup is now merged, this is a separate follow-up.

Validation:

  • Four Kernel cases pass on Drupal 10 and 11, including serialized instances and the pending MRs combined.
  • Resolves eight PHPStan dependency-injection findings without suppressions.
  • The pending MR diffs apply alongside this change in either order.

Constructor dependencies and the protected storage property change; custom instantiation or subclasses may require updates.

An equivalent GLightbox contribution will follow.

Issue: https://www.drupal.org/project/glightbox_media_video/issues/3628876

AI-Generated: Yes (Codex prepared the changes and verification).

Merge request reports

Loading
Loading