Problem/Motivation

Since Drupal 11.3, PluginBase provides create() factory method with autowired parameters: https://www.drupal.org/node/3542837

This is the opportunity of removing a lot of code 🎉

Proposed resolution

  1. Make IslandPluginBase extends Drupal\Core\Plugin\PluginBase instead of Drupal\Component\Plugin\PluginBase
  2. Remove the create methods (when possible, not every plugin type extends Core's PluginBase
$ grep -lr "function create" src/Plugin/
src/Plugin/UiPatterns/Source/TextareaWidget.php
src/Plugin/UiPatterns/Source/LayoutSource.php
src/Plugin/display_builder/Island/StateButtons.php
src/Plugin/display_builder/Island/BuilderPanel.php
src/Plugin/display_builder/Island/ViewportSwitcher.php
src/Plugin/display_builder/Island/WireframePanelBase.php
src/Plugin/display_builder/Island/LogsPanel.php
src/Plugin/display_builder/Island/BackButton.php
src/Plugin/display_builder/Island/VisibilityConditionsPanel.php
src/Plugin/display_builder/Island/ComponentLibraryPanel.php
src/Plugin/display_builder/Island/StylesPanel.php
src/Plugin/display_builder/Island/BlockLibraryPanel.php
src/Plugin/display_builder/Island/PreviewPanel.php
src/Plugin/display_builder/Island/DesignTokensPanel.php
src/Plugin/display_builder/Island/Collaboration.php
src/Plugin/display_builder/Island/PresetLibraryPanel.php
$ grep -lr "function create" modules/*/src/Plugin/
modules/display_builder_entity_view/src/Plugin/UiPatterns/Source/ExtraFieldSource.php
modules/display_builder_entity_view/src/Plugin/Derivative/EntityOverrideViewLocalTask.php
modules/display_builder_page_layout/src/Plugin/UiPatterns/Source/PageLayoutSource.php
modules/display_builder_page_layout/src/Plugin/DisplayVariant/PageLayoutPageVariant.php
modules/display_builder_page_layout/src/Plugin/DisplayVariant/FullPageBuilderPageVariant.php
modules/display_builder_views/src/Plugin/views/display_extender/DisplayExtender.php
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

pdureau created an issue. See original summary.

grimreaper’s picture

Assigned: Unassigned » grimreaper

grimreaper’s picture

Status: Active » Needs work
Parent issue: » #3604395: Automated Drupal 12 compatibility fixes for ui_patterns 2.0.x-dev

Need #3604395: Automated Drupal 12 compatibility fixes for ui_patterns 2.0.x-dev to be merged before merging this one and with a new UIP release.

grimreaper’s picture

Assigned: grimreaper » Unassigned

Need to wait for UIP issue to fix the tests.