Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
EntityInterface::toLink()
currently document $text as a string|null.
The function actually accepts string|null|array|\Drupal\Component\Render\MarkupInterface
since it uses Drupal\Core\Link to output markup.
Proposed resolution
Update EntityInterface::toLink() $text documentation so the $text input is correctly hinted.
Remaining tasks
- Write a patch
- Review
- Commit
User interface changes
None
API changes
None
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#3 | 3322485-3.patch | 940 bytes | anneke_vde |
Comments
Comment #2
anneke_vde CreditAttribution: anneke_vde at iO commentedComment #3
anneke_vde CreditAttribution: anneke_vde at iO commentedAttached patch updates the documentation for EntityInterface::toLink() $text
Comment #4
idebr CreditAttribution: idebr at iO commentedPatch works as expected and fixes static code analysis on customer project, thanks!
Comment #6
idebr CreditAttribution: idebr at iO commentedUnrelated test failure
Comment #7
alexpottCommitted and pushed d2c5a0832c to 10.1.x and 0880562ffc to 10.0.x and b4db962330 to 9.5.x and 6a6dc60c08 to 9.4.x. Thanks!