Array declaration issue

Created on 18 July 2023, over 1 year ago
Updated 27 January 2024, 12 months ago

Fatal error: Declaration of Drupal\editor_advanced_link\Plugin\CKEditor4To5Upgrade\AdvancedLink::mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem(string $cke4_button, Drupal\ckeditor5\HTMLRestrictions $text_format_html_restrictions): ?array must be compatible with Drupal\ckeditor5\Plugin\CKEditor4To5UpgradePluginInterface::mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem(string $cke4_button): ?string in /usr/local/apache2/htdocs/web/modules/contrib/editor_advanced_link/src/Plugin/CKEditor4To5Upgrade/AdvancedLink.php on line 30"

Drupal version - 9.5.8
Editor advance link version - 2.2.4
This issue occurs while upgrading to ckeditor5.

🐛 Bug report
Status

Closed: won't fix

Version

2.2

Component

Code

Created by

🇮🇳India ShraddhaKandale

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

Comments & Activities

  • Issue created by @ShraddhaKandale
  • 🇮🇳India ShraddhaKandale

    I have fixed the declaration issue. Please have a look!

  • Assigned to d70rr3s
  • Status changed to Closed: won't fix 12 months ago
  • 🇪🇸Spain d70rr3s

    The patch is not correct, it changes implementation's signature directly without any research.

    The interface in core Drupal\ckeditor5\Plugin\CKEditor4To5UpgradePluginInterface::mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem have changed to current signature `public function mapCKEditor4ToolbarButtonToCKEditor5ToolbarItem(string $cke4_button, HTMLRestrictions $text_format_html_restrictions): ?array` which is the same implemented by the module.

    The interface was changed on core 9.4 and 10.0.x and backported to 9.3, check this comment here .

    The signature displayed on the error message dates back to 9.3 initial release, check this commit.

    Also cannot reproduce the error using the issue with the proposed versions.

  • Issue was unassigned.
Production build 0.71.5 2024