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
Remove all the occurrence of drupal_set_message() is deprecated
Proposed resolution
Drupal 8.5.x has introduced a new messenger service.
I replaced drupal_set_message() with Drupal Messenger service.
Comment | File | Size | Author |
---|---|---|---|
#7 | remove_drupal_set_message-2.patch | 4 KB | NaheemSays |
|
Comments
Comment #2
Sergiu Stici CreditAttribution: Sergiu Stici at FFW commentedComment #3
Sergiu Stici CreditAttribution: Sergiu Stici at FFW commentedComment #4
Berdirall forms have the Messenger trait now, so we can just use $this->messenger() and remove all this.
Comment #5
NaheemSays CreditAttribution: NaheemSays commentedComment #6
NaheemSays CreditAttribution: NaheemSays commentedComment #7
NaheemSays CreditAttribution: NaheemSays commentedReplaced an addMessage with an addError.
Comment #8
BerdirThanks, straight-forward now.