Move code from the experimental SDC module to core

Created on 4 April 2023, about 1 year ago
Updated 18 June 2024, 8 days ago

This is our plan to move the code in the `sdc` module to the core namespace while maintaining backwards compatibility with the experimental module.

Merge Request Strategy

We have this META issue to move all the core from the current location in the experimental module into the Drupal\Core namespace. This meta issue will have a **draft** MR associated against HEAD (currently 11.x).

We will break tasks to move the code into smaller issues which will contain any potential discussion on the implementation. This will allow us to make more sense of the conversations, and to parallelize tasks with other contributors. Each one of these smaller issues will contain an MR against the branch for the META issue. As we merge these MRs for the smaller issues, the bigger diff will start to build up in the draft MR associated to the META issue.

Once we have all the smaller issues merged, we will work to clear the release manager and commit manager tags from the big MR, in order to get it merged. We also plan on requesting validation from core committers in these smaller issues, in order to raise any concerns early on.

Backwards Compatibility

The `sdc.module` file contains the following:

// Set class aliases for the classes that will go into core.
// See the experimental modules policy https://www.drupal.org/core/experimental
// @todo: remove class aliases in #3354389
@class_alias('Drupal\sdc\Element\ComponentElement', 'Drupal\Core\Render\Element\ComponentElement');
@class_alias('Drupal\sdc\Exception\ComponentNotFoundException', 'Drupal\Core\Render\Component\Exception\ComponentNotFoundException');
@class_alias('Drupal\sdc\Exception\IncompatibleComponentSchema', 'Drupal\Core\Render\Component\Exception\IncompatibleComponentSchema');
@class_alias('Drupal\sdc\Exception\InvalidComponentDataException', 'Drupal\Core\Render\Component\Exception\InvalidComponentDataException');
@class_alias('Drupal\sdc\Exception\InvalidComponentException', 'Drupal\Core\Render\Component\Exception\InvalidComponentException');

All classes in sdc are marked as @internal. We understand that the Drupal core backwards compatibility policy includes classes and services marked internal. All classes in sdc are also final (with the exception of Drupal\sdc\Element\ComponentElement) which will make it impossible to extend them. However, we acknowledge that manual instantiation and execution of static public methods still require backwards compatibility.

In order to provide backwards compatibility, we propose to use class_alias. This will handle the namepace changes. A deprecation notice will be thrown because the module itself is deprecated. In order to clear the deprecation the user will need to change their use statements using the list of class_alias in sdc.module as a reference.

Additional Considerations

We will not merge this until feedback from experimental users is done in regards to the other issues in our roadmap to stability. Therefore, we will keep this updated during the process and then merge as a last step.

Remove deprecated twig functions declared in πŸ“Œ Remove SDC deprecated twig functions before 11.0.0 Postponed

Issues

Release notes

The single directory components module is now deprecated. The functionality has been moved to Drupal core.

πŸ“Œ Task
Status

Fixed

Version

10.3 ✨

Component
single-directory componentsΒ  β†’

Last updated about 15 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States mherchel Gainesville, FL, US

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024