Issue #3619036: Load required CodeMirror assets for PHP mode

Closes #3619036

Summary

PHP mode can be selected in CKEditor CodeMirror settings, but the Drupal library did not declare the CodeMirror PHP mode script or its required C-like mode dependency. This prevented PHP syntax highlighting from being initialized completely.

The problem was reproduced on Drupal 10.6.15 and Drupal 11.4.5. The runtime report is attached to the Drupal.org issue.

Changes

  • Declare mode/clike/clike.js, which PHP mode depends on.
  • Declare mode/php/php.js.
  • Add functional regression coverage verifying that both assets are present in Drupal's discovered CodeMirror library.

Testing

  • Runtime reproduction completed on Drupal 10 and Drupal 11 before the fix.
  • PHP 8.3 syntax validation passed locally.
  • Automated regression coverage is included in this merge request.

The separate issue involving the Enable checkbox is intentionally outside the scope of this merge request.

Merge request reports

Loading
Loading