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
#2454447: Split Utility\String class to support PHP 7 (String is a reserved word) deprecated all the functions in Utility/String. String::decodeEntities() was moved to Html::decodeEntities(). Since String class is deprecated but Core still uses String::decodeEntities() so this issue aims to make use of Html::decodeEntities() in all such places.
Proposed resolution
Move all usages of String::decodeEntities() to Html::decodeEntities()
Remaining tasks
- Patch
- Review
User interface changes
None
API changes
None
Comment | File | Size | Author |
---|---|---|---|
#27 | 2457781-decodeentities-27.patch | 26.52 KB | stefan.r |
Comments
Comment #1
andypostComment #2
andypostComment #3
andypostComment #4
prateekMehta CreditAttribution: prateekMehta commentedMoving all usages of String::decodeEntities() to Html::decodeEntities()
replacing Drupal\Component\Utility\String::decodeEntities() Drupal\Component\Utility\Html::decodeEntities() or
Adding Drupal\Component\Utility\Html::decodeEntities() wherever required.
Comment #5
prateekMehta CreditAttribution: prateekMehta commentedComment #6
dawehnerThis looks great, let's see whether it passes.
Comment #8
prateekMehta CreditAttribution: prateekMehta commentedHad accidentally used
Drupal\Component\Utility\Html
twice in a couple of files,removing it.
Comment #9
prateekMehta CreditAttribution: prateekMehta commentedComment #11
prateekMehta CreditAttribution: prateekMehta commentedReplacing at a few other places,sorry for negligence.
Comment #12
prateekMehta CreditAttribution: prateekMehta commentedComment #13
dpopdan CreditAttribution: dpopdan commentedLooks good to me, just please remove decodeEntities() from Drupal\Component\Utility\String.
Comment #14
AjitSRemoving the deprecated function as suggested in #13.
Comment #15
dpopdan CreditAttribution: dpopdan commentedThanks !
Comment #16
alexpottLet's remove this in a separate issue. Makes rollbacks and managing the rtbc queue easier. Also please attached this issue to the change record.
Comment #17
alexpottIn fact we should should have a single issue to remove the string class that will go in after all the conversions are done.
Comment #18
hussainwebI believe that was what was in patch in #11. Uploading here again. Setting to RTBC. Updating change record at https://www.drupal.org/node/2457593.
EDIT: Fixed link to change record.
Comment #19
hussainwebCreated follow up at #2458387: Remove Utility\String class.
Comment #20
BerdirChanging parent, so all these issues are visible in the php7 meta issue.
Comment #21
webchickUnsurprisingly, this needs a re-roll after #2457887: Use Utility\SafeMarkup class instead of Utility\String for placeholder(), checkPlain(),format() functions.
Comment #22
kim.pepperDidn't get any merge conflicts in re-roll. Was that expected?
Comment #24
kim.pepperHelps if I update 8.0.x first. :-(
Comment #25
stefan.r CreditAttribution: stefan.r commentedYou may have forgotten to pull? :)
Let's see if this passes tests...
Comment #27
stefan.r CreditAttribution: stefan.r commentedComment #28
andypostChecked, all converted and no "use" left
Comment #29
alexpottThis should be critical since it's parent task is. Committed f3b8d07 and pushed to 8.0.x. Thanks!