Review main Merged

70245[BUGFIX] Instantiate ImageService in ImageViewHelper constructor

Oli Bartsch CR +2 V +2 Easy +12 −10 updated 08/06/21, 13:35

Commit message

In #94491 the injection of the ImageService in the
ImageViewHelper was replaced by instantiating
with GeneralUtility. This was done, since the
ImageViewHelper is also used in the install tool,
where no DI of this service is possible.

However, since ImageService can be extended by
third-party ViewHelpers, this then broke when
accessing $this->imageService.

This is now fixed by instantiating  and assigning the
ImageService in the constructor to the $imageService
class variable. This way the DI is still not used, but
backwards compatibility is given.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 2