Fix deprecation issues.

Created on 7 December 2019, almost 6 years ago
Updated 1 July 2025, 3 months ago

I noticed these following errors while using drupal-check:

➜  wordfilter drupal-check .   
 21/21 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ---------------------------------------------------------------------- 
  Line   src/Form/WordfilterConfigurationDeleteForm.php                        
 ------ ---------------------------------------------------------------------- 
  41     Call to deprecated function drupal_set_message():                     
         in Drupal 8.5.0 and will be removed before Drupal 9.0.0.              
         Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.  
 ------ ---------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------- 
  Line   src/Form/WordfilterConfigurationForm.php                              
 ------ ---------------------------------------------------------------------- 
  305    Call to deprecated function drupal_set_message():                     
         in Drupal 8.5.0 and will be removed before Drupal 9.0.0.              
         Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.  
  338    Call to deprecated function drupal_set_message():                     
         in Drupal 8.5.0 and will be removed before Drupal 9.0.0.              
         Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.  
  344    Call to deprecated function drupal_set_message():                     
         in Drupal 8.5.0 and will be removed before Drupal 9.0.0.              
         Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.  
 ------ ---------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------- 
  Line   tests/src/Unit/TokenWordfilterProcessUnitTest.php                        
 ------ ------------------------------------------------------------------------- 
  30     Call to deprecated method getMock() of class Drupal\Tests\UnitTestCase:  
         in Drupal 8.5.0 and will be removed before Drupal 9.0.0.                 
         Use \Drupal\Tests\PhpunitCompatibilityTrait::createMock() instead.       
 ------ ------------------------------------------------------------------------- 

                                                                                                    
 [ERROR] Found 5 errors                                                                             
                                                                                                    

➜  wordfilter 
📌 Task
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇲🇺Mauritius neel24

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024