Removal of @internal tag from Drupal\media\Plugin\Field\FieldFormatter\OEmbedFormatter and Drupal\user\ProfileForm.

Created on 20 November 2023, 7 months ago
Updated 6 December 2023, 6 months ago

Problem/Motivation


There are several contributed modules using Drupal\media\Plugin\Field\FieldFormatter\OEmbedFormatter
Ex: https://www.drupal.org/project/media_entity_instagram being used by around 10k sites
https://www.drupal.org/project/varbase_media
For such modules to be D10 compatibility we need to make OEmbedFormatter as a normal class and not a normal class.


Form being used for customizations of user detail form.

Steps to reproduce Drupal\media\Plugin\Field\FieldFormatter\OEmbedFormatter.

Get D10 compatible version of modules and Scan the module using upgrade status module .

Proposed resolution

Removal of @internal tag

Remaining tasks

Review for patch

User interface changes

None

API changes

removal of @internal tag

Feature request
Status

Closed: won't fix

Version

10.0

Component
Media 

Last updated 1 day ago

Created by

🇮🇳India shubhangi1995 GURGAON

Live updates comments and jobs are added and updated live.
  • Needs subsystem maintainer review

    It is used to alert the maintainer(s) of a particular core subsystem that an issue significantly impacts their subsystem, and their signoff is needed (see the governance policy draft for more information). Also, if you use this tag, make sure the issue component is set to the correct subsystem. If an issue significantly impacts more than one subsystem, use needs framework manager review instead.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @shubhangi1995
  • First commit to issue fork.
  • Status changed to Needs review 7 months ago
  • 🇮🇳India ankithashetty Karnataka, India

    +1 to this issue. Noticed these warnings for the module in upgrade status reports (For ref: #3380177)

    Raised an MR for the same.

    Before fix:

    After fix:

    Thanks!

  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    This doesn't prevent using them on D10

    It just warns that you're building on shifting sands

  • 🇮🇳India ankithashetty Karnataka, India

    True. Not a blocker at all as we are able to use the module. But had come across such similar instance #3256539: Remove @internal from ContentEntityDeleteForm generic base class where we removed the @internal tag from a class that was being extended. Hence the MR.
    Please suggest, if such warnings can be ignored.

    Thank you!

  • 🇺🇸United States smustgrave

    Seems something that should get submaintainer sign off.

  • 🇺🇸United States phenaproxima Massachusetts

    I don't think this should be committed as-is.

    First of all...it's affecting two different, completely unrelated classes in two different modules. What is the rationale for that?

    More importantly, there are real reasons why these classes are internal. They are not meant to be heavily extended - code that does it is playing a dangerous game and courting sudden breakage, as @larowlan points out.

    As @ankithashetty points out, this is not actually blocking anything -- it sounds like it's just to remove IDE warnings. The IDE is right to warn about extending (or even touching) internal classes, but you can either copy the classes wholesale into your own module(s) if you need to customize them, or ignore the warnings entirely if you're not concerned about them.

    So, my impulse is to close this issue as "won't fix" - leaving that for someone else, though, in case I'm missing something. :)

  • Status changed to Postponed: needs info 6 months ago
  • 🇺🇸United States smustgrave

    Going to put into PNMI for an answer to above. If not we can close out.

  • Status changed to Closed: won't fix 6 months ago
  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    You can use the module

    It's just that phpstan and upgrade status are warning you that things might change in the future without a BC layer

    If you have test coverage for the functionality, then you're ok

    Removing the internal tag is not the solution

Production build 0.69.0 2024