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
fieldFilterXss method is documented as returing a SafeMarkup object, that's why we get the PhpStorm warning when trying to use the filtered string as a string.
Proposed resolution
Change the @return typehint to \Drupal\Core\Field\FieldFilteredMarkup
which is what is returned.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#8 | change_the_return_of-2504607-8.patch | 562 bytes | juanjesustrigo |
#8 | interdiff.txt | 532 bytes | juanjesustrigo |
#2 | change_the_return_of-2504607-1.patch | 530 bytes | mgifford |
#1 | change_the_return_of-2504607-1.patch | 530 bytes | sasanikolic |
Comments
Comment #1
sasanikolic CreditAttribution: sasanikolic at MD Systems GmbH commentedComment #2
mgiffordRe-uploading patch for the bots.
Comment #3
dawehnerThe right return value is
\Drupal\Core\Field\FieldFilteredMarkup
Comment #7
juanjesustrigo CreditAttribution: juanjesustrigo at La Drupalera by Emergya commentedI'll work on this
Comment #8
juanjesustrigo CreditAttribution: juanjesustrigo at La Drupalera by Emergya commentedI have made the changes explained in #3
Comment #9
juanjesustrigo CreditAttribution: juanjesustrigo at La Drupalera by Emergya commentedComment #10
dawehnerI updated the issue summary with the actual implemented solution.
I just changed it to documentation, not sure we still do that kind of component moving though. Don't be mad at me :)
Comment #11
alexpottComment #12
alexpottCommitted and pushed 163b510 to 8.4.x and 212818c to 8.3.x. Thanks!