Strict return type of filter tips is in conflict with what is returned

Created on 18 July 2025, 3 months ago

Problem/Motivation

 Uncaught PHP Exception TypeError: "Drupal\ckeditor_taxonomy_glossary\Plugin\Filter\GlossaryLinkFilter::tips(): Return value must be of type string, Drupal\Core\StringTranslation\TranslatableMarkup returned" at /var/www/html/web/modules/contrib/ckeditor_taxonomy_glossary/src/Plugin/Filter/GlossaryLinkFilter.php line 171

Steps to reproduce

Proposed resolution

The Drupal base class and interface do require a strict return type. The PHPDoc is a bit clunky, because it says "string", although in a lot of examples it's returning t() and therefore a TranslatableMarkup object.

Right now the easiest is to remove the strict return type and call it the day.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇩🇪Germany szeidler Berlin

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