Problem/Motivation

As a part of D9 readiness update, deprecated method calls should be removed and replaced with suggested calls.
This issue is for all issues in misc files now covered by #3091458: Deprecations removal: data_search module. and #3091460: Deprecations removal. Drupal 9 readiness.

Below is drupal-check report:

~/.config/composer/vendor/bin/drupal-check -d -- data.* src/Form/ src/Plugin/
 16/16 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ------------------------------------------------------------------------- 
  Line   data.module                                                              
 ------ ------------------------------------------------------------------------- 
  227    Call to deprecated function db_escape_table():                           
         as of Drupal 8.0.x, will be removed in Drupal 9.0.0. Instead, get        
         a database connection injected into your service from the container and  
         call escapeTable() on it. For example,                                   
  391    Call to deprecated function db_query():                                  
         as of Drupal 8.0.x, will be removed in Drupal 9.0.0. Instead, get        
         a database connection injected into your service from the container and  
         call query() on it. For example,                                         
 ------ ------------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------- 
  Line   src/Form/TableConfigDeleteForm.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/TableConfigForm.php                                                      
 ------ ---------------------------------------------------------------------------------- 
  128    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.              
  134    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.              
  140    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.              
  144    Call to deprecated method urlInfo() of class Drupal\Core\Entity\EntityInterface:  
         in Drupal 8.0.0, intended to be removed in Drupal 9.0.0                           
         Use \Drupal\Core\Entity\EntityInterface::toUrl() instead.                         
 ------ ---------------------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------------------------------------------------------- 
  Line   src/Plugin/views/field/DataViewsField.php                                                                            
 ------ --------------------------------------------------------------------------------------------------------------------- 
  15     Class Drupal\data\Plugin\views\field\DataViewsField extends deprecated class Drupal\views\Plugin\views\field\Field:  
         in Drupal 8.3.x and will be removed before 9.0.0                                                                     
         Use \Drupal\views\Plugin\views\field\EntityField instead.                                                            
 ------ --------------------------------------------------------------------------------------------------------------------- 

                                                                                                                        
 [ERROR] Found 8 errors                                                                                                 
                                                                                                                        
                                                                            

Proposed resolution

Replace deprecated function calls with suggested replacements.

Remaining tasks

Just do it.

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

abramm created an issue. See original summary.

nnevill’s picture

On it during DrupalCon Amsterdam Contribution day.

abramm’s picture

Issue tags: +Amsterdam2019
nnevill’s picture

Seems this module is not usable for drupal 8 so no way to make it drupal 9 ready. Need to make it drupal 8 ready as well.
E.g. there are usages of drupal_write_record() function which has been deleted from drupal 8.

kristen pol’s picture

Issue tags: +Drupal 9 compatibility

Per a Slack discussion with Gábor Hojtsy regarding usage of D9 tags (Drupal 9, Drupal 9 compatibility, Drupal 9 readiness, etc.), "Drupal 9 compatibility" should be used for contributed projects that need updating and "Drupal 9" was the old tag for D8 issues before the D9 branch was ready. Doing tag cleanup here based on that discussion.