[2.0.0-alpha1] Target Drupal 10.3

Created on 31 March 2024, 8 months ago
Updated 18 April 2024, 7 months ago

Problem/Motivation

Starting Drupal 10.3, SDC is not a module anymore, but a part of the Core namespace: https://www.drupal.org/node/3410260

  • Any modules and themes that depend on the sdc module should drop this dependency.
  • Any extensions using any code under the Drupal\sdc namespace, should change to the new namespaces as mentioned in each of the deprecation messages.

Proposed resolution

ui_patterns.info.yml

 name: "UI Patterns"
 type: module
 description: "Define and expose self-contained UI Components as Drupal plugins and use them seamlessly in Drupal development and site-building."
-core_version_requirement: ^10.2
+core_version_requirement: ^10.3
 package: "User interface"
-dependencies:
-  - drupal:sdc

Replace "Drupal\sdc\" by "Drupal\Core\Theme\" in:

  • src/ (recursively)
  • modules/ui_patterns_legacy/src/ (recursively)
  • ui_patterns.services.yml
  • modules/ui_patterns_layouts/ui_patterns_layouts.module

Then, replace "Drupal\Core\Theme\Plugin\Component" by "Drupal\Core\Plugin\Component" everywhere.

Remove dependency from tests:

  • modules/ui_patterns_layouts/tests/modules/ui_patterns_layouts_test/ui_patterns_layouts_test.info.yml
  • tests/src/Kernel/*.php

Remaining tasks

plugin.manager.sdc must be the only reference to former SDC module:

Remove 'category' => 'sdc' from modules/ui_patterns_layouts/ui_patterns_layouts.module
Rename "sdc_plugin_manager" by "component_plugin_manager" in src/Element/ComponentFormBase.php

Clean tests:

  • Remove tests/modules/ui_patterns_test/components/README.md whole file which is mentionning outdated namespaces.
  • Remove all $schema properties from tests/modules/ui_patterns_test/components/

Non SDC related, but other deprecations:

  • Call to deprecated method renderPlain() of class Drupal\Core\Render\Renderer in drupal:10.3.0 and is removed from drupal:12.0.0. Use \Drupal\Core\Render\RendererInterface::renderInIsolation() instead.
  • Class Drupal\ui_patterns\Element\ComponentFormBase extends deprecated class Drupal\Core\Render\Element\FormElement in drupal:10.3.0 and is removed from drupal:12.0.0. use \Drupal\Core\Render\Element\FormElementBase instead.
  • Call to method preRenderAjaxForm() of deprecated class Drupal\Core\Render\Element\RenderElement in drupal:10.3.0 and is removed from drupal:12.0.0. Use \Drupal\Core\Render\Element\RenderElementBase instead

Run phpcs --standard=Drupal & drupal-check before commiting.

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇫🇷France pdureau Paris

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024