Core issue? How to subclass the entity class, twice

Created on 7 February 2017, almost 8 years ago
Updated 6 December 2024, 12 days ago

Hi!

I love the way that this module swaps out the entity for image styles, in fact, I love it so much that I do the same in my module.

See:
http://cgit.drupalcode.org/remote_stream_wrapper/tree/remote_stream_wrap...
and
http://cgit.drupalcode.org/imageapi_optimize/tree/src/ImageAPIOptimizeHo...

however, that means that our modules conflict, since they both extend the base Drupal\image\Entity\ImageStyle class. Resulting in issues like this:
🐛 Incompatibility with remote_stream_wrapper module Needs work

I'd like to find a way forward, but I'm not sure. Maybe we should decorate instead of subclassing?
Or does core need to support modules doing this sort of thing more easily?
Discuss!

📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom steven jones

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇬🇧United Kingdom rossb89 Bristol

    rossb89 changed the visibility of the branch 8.x-1.x to hidden.

  • @rossb89 opened merge request.
  • 🇬🇧United Kingdom rossb89 Bristol

    rossb89 changed the visibility of the branch 2.x to hidden.

  • 🇬🇧United Kingdom rossb89 Bristol

    I've got a new MR (17) against 2.x-dev with the same bits in the patch from #9, so can use this version with core 10.3 and 2.1 remote_stream_wrapper.

    Changed version in this ticket to 2.x-dev as 8.x-1.x-dev isn't a supported version any more.

    It looks like tests are currently failing from other code in the module.

Production build 0.71.5 2024