Problem/Motivation

From Drupal 10.3 on, plugins should use PHP attributes instead of a plugin annotations. See the following for more information:

So this should be changed for view_mode_switch related plugins once Drupal 10.2.x is not supported by the module anymore.

Proposed resolution

  • Replace view_mode_switch module's plugin annotations with corresponding PHP attributes

Remaining tasks

  • Create issue fork and MR to fix this issue

User interface changes

n/a

API changes

  • view_mode_switch field type plugin will only be found by attribute discovery of field type plugins anymore
  • view_mode_switch field formatter plugins will only be found by attribute discovery of field type plugins anymore
  • view_mode_switch field widget plugin will only be found by attribute discovery of field type plugins anymore

Data model changes

n/a

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hctom created an issue. See original summary.

hctom’s picture

Title: Relpace annotation of field type plugin with attribute » Replace annotation of field type plugin with attribute
Issue summary: View changes

Fix typos

hctom changed the visibility of the branch 3.x to hidden.

hctom’s picture

Title: Replace annotation of field type plugin with attribute » Replace annotation of plugins with corresponding PHP attributes
Issue summary: View changes

Update issue to target all plugins (except diff - current stable does not support PHP attribute based plugin discovery)

hctom’s picture

Status: Active » Fixed

Plugin annotations have been replaced with corresponding PHP attributes for

  • Field formatter plugins
  • Field type plugin
  • Field widget plugin

So this is done for now.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

hctom’s picture

Status: Fixed » Closed (fixed)