ImageStyle::getReplacementID missing from interface

Created on 9 January 2025, 3 months ago

Problem/Motivation

ImageStyle::getReplacementID is written like its implementing an interface but it doesn't exist on the interface:


  /**
   * {@inheritdoc}
   */
  public function getReplacementID() {

This means the method doesn't actually have any documentation.

Steps to reproduce

Code issue. You'll have to look at ImageStyle.php and ImageStyleInterface.php or see the missing hints in your IDE.

Proposed resolution

Add method to interface and document the method.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

๐Ÿ› Bug report
Status

Active

Version

11.1 ๐Ÿ”ฅ

Component

image system

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States neclimdul Houston, TX

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

Merge Requests

Comments & Activities

  • Issue created by @neclimdul
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States neclimdul Houston, TX

    This actually shows up in the phpstan report as well.

    I think this might actually be a dead method as well so removing it might also be an option. It just proxies through to the storage method of the similar name(different capitalization) and using that might be the correct way of accomplishing this.

  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand quietone
  • First commit to issue fork.
  • Pipeline finished with Failed
    3 months ago
    Total: 106s
    #395588
  • Pipeline finished with Success
    3 months ago
    Total: 398s
    #395595
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States neclimdul Houston, TX

    Looks good for the straightforward fix.

    Will leave questions of the not strictly camelcacse code and possible code removal to committer review and RTBC this.

  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand quietone

    If it really isn't used we should deprecate it now instead of postponing that..

    I didn't find usages in core. I didn't find one in contrib either. Did I miss a usage? Can someone check on that?

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia shalini_jha

    @quietone You are correct. I have also checked the usage of ImageStyle::getReplacementID, and I could not find any.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch

    I think @quietone is right and we should deprecate this instead.

  • Pipeline finished with Success
    about 7 hours ago
    Total: 846s
    #481005
  • Status changed to Needs review about 7 hours ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia shalini_jha

    Iโ€™ve deprecated the getReplacementID() method after confirming it isnโ€™t used in core or contrib, and I followed a similar approach to other deprecated methods. Moving this NR , Could you please review and let me know if anything needs to be updated or improved?

    Thank you for the guidance!

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Feedback appears to be addressed.

Production build 0.71.5 2024