hook_ckeditor5_plugin_info_alter() implementations that add a plugin should not be allowed

Created on 31 October 2022, over 1 year ago
Updated 2 November 2023, 8 months ago

Problem/Motivation

Just like \Drupal\Core\Config\TypedConfigManager::alterDefinitions() throws an exception when it detects an "alter hook" implementation adding a new plugin, we should the same for CKEditor 5.

(Discovered in #3313473: CKEditor 5 plugin definitions should be derivable → .)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Needs work

Version

11.0 🔥

Component
CKEditor 5  →

Last updated 37 minutes ago

Created by

🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

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

  • 🇫🇷France vbouchet

    Please find a patch doing so. New tests need to be created.

  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7 updated deps
    last update 8 months ago
    30,480 pass
  • Status changed to Needs work 8 months ago
  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

    Looks great! 🤩

    If you're interested, I think the best way to test this would be to extend \Drupal\Tests\ckeditor5\Kernel\CKEditor5PluginManagerTest::testInvalidPluginDefinitions(). That'd also require making \Drupal\Tests\ckeditor5\Kernel\CKEditor5PluginManagerTest::mockModuleInVfs() more capable. Would you be interested in doing that too, @vbouchet? 🤓

  • 🇫🇷France vbouchet

    Can't promise any timing but I am always interested to follow my patches when I get reply and clear direction 😉.
    Will try to have a look.

Production build 0.69.0 2024