Problem/Motivation

The "Summer of UI Patterns" is starting soon with a focus on #ui_patterns-next which will simplify a lot our plugin managers:

  • src/ComponentPluginManager.php
  • src/DerivableContextPluginManager.php
  • src/PropTypeAdapterPluginManager.php
  • src/PropTypePluginManager.php
  • src/SourcePluginManager.php

Proposed resolution

So, to avoid extra complexity and unexpected risks, we need to reduce the scope of the API by moving as much protected and public methods and properties to private visibility scope.

This is not an endorsement of private visibility scope in general for UI Patterns and UI Suite projects. We believe in wide open, extensible, API, but this is a contextual need.

Also, it will allow the ecosystem of contrib and custom modules to prepare to the changes.

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.

pdureau’s picture

Status: Active » Needs work

Work in progress.

We have aleady removed those methods from the API scope (they went from public to private):

  • PropTypePluginManager::getPropConvertibilityGraph()
  • SourcePluginManager::getNativeDefinitionsForPropType()
  • SourcePluginManager::getConvertibleDefinitionsForPropType()
  • SourcePluginManager::isApplicable()

This will make the eventual removal of PropType plugins easier for the next major release of UI Patterns.

2 phpunit fails don't seem related to the current work and are also met in #3589204: Drupal 12 and phpunit and #3590426: Reduce the API scope of our plugin managers:

1) Drupal\Tests\ui_patterns_layouts\Functional\LayoutBuilderRenderTest::testRenderSlotsReplaced
Behat\Mink\Exception\ElementTextException: The text "field_text_1 value" was not found in the text of the element matching css ".ui-patterns-test-form-replaced-slot".
2) Drupal\Tests\ui_patterns_layouts\Functional\LayoutBuilderRenderTest::testRenderSlots
Behat\Mink\Exception\ElementTextException: The text "field_text_1 value" was not found in the text of the element matching css ".ui-patterns-slots-slot".
pdureau’s picture

Assigned: pdureau » Unassigned
Status: Needs work » Needs review
pdureau’s picture

Assigned: Unassigned » pdureau
Status: Needs review » Needs work
pdureau’s picture

Assigned: pdureau » Unassigned
Status: Needs work » Needs review
just_like_good_vibes’s picture

Status: Needs review » Reviewed & tested by the community

seems ok