Comments

valthebald created an issue. See original summary.

abramm’s picture

Going to check it at DrupalCon Amsterdam 2019.

abramm’s picture

It appears like the module has few files containing dead code which are probably leftovers from D7:

  1. includes/DataHandler.inc
  2. tests/data.test
  3. tests/data.test.inc
  4. views/views_handler_field_data_markup.inc

Sadly, tests weren't ported from D7 and are useless right now.

I've raised #3091442 for this.

Here's the drupal-check report excluding those files:

 ~/.config/composer/vendor/bin/drupal-check -d -- .
 25/25 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 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   data_search/data_search.admin.inc                                        
 ------ ------------------------------------------------------------------------- 
  15     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.     
  70     Call to deprecated function drupal_render():                             
         as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Use the         
  77     Call to deprecated function drupal_render_children():                    
         in Drupal 8.0.x and will be removed before 9.0.0. Avoid early            
         rendering when possible or loop through the elements and render them as  
         they are available.                                                      
 ------ ------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------- 
  Line   data_search/data_search.install                                          
 ------ ------------------------------------------------------------------------- 
  17     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,                                         
  18     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,                                         
  19     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   data_search/data_search.module                                           
 ------ ------------------------------------------------------------------------- 
  88     Call to deprecated function db_query_range():                            
         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 queryRange() on it. For example,                                    
  92     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,                                         
  101    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,                                         
  117    Call to deprecated function db_update():                                 
         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 update() on it. For example,                                        
  135    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,                                         
  137    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,                                         
  156    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,                                   
  160    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,                                         
  162    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.                                                            
 ------ --------------------------------------------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------- 
  Line   src/Table.php                                                             
 ------ -------------------------------------------------------------------------- 
  47     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,                                    
  68     Call to deprecated function db_table_exists():                            
         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, get  
         its schema driver, and call tableExists() on it. For example,             
  72     Call to deprecated function db_create_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, get  
         its schema driver, and call createTable() on it. For example,             
  75     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.      
  186    Call to deprecated function db_delete():                                  
         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 delete() on it. For example,                                         
  263    Call to deprecated function db_add_field():                               
         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, get  
         its schema driver, and call addField() on it. For example,                
  294    Call to deprecated function db_add_index():                               
         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, get  
         its schema driver, and call addIndex() on it. For example,                
  312    Call to deprecated function db_drop_index():                              
         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, get  
         its schema driver, and call dropIndex() on it. For example,               
  333    Call to deprecated function db_add_unique_key():                          
         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, get  
         its schema driver, and call addUniqueKey() on it. For example,            
  353    Call to deprecated function db_drop_unique_key():                         
         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, get  
         its schema driver, and call dropUniqueKey() on it. For example,           
  401    Call to deprecated function db_add_primary_key():                         
         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, get  
         its schema driver, and call addPrimaryKey() on it. For example,           
  418    Call to deprecated function db_drop_primary_key():                        
         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, get  
         its schema driver, and call dropPrimaryKey() on it. For example,          
  465    Call to deprecated function db_change_field():                            
         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, get  
         its schema driver, and call changeField() on it. For example,             
  483    Call to deprecated function db_drop_field():                              
         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, get  
         its schema driver, and call dropField() on it. For example,               
  505    Call to deprecated function db_table_exists():                            
         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, get  
         its schema driver, and call tableExists() on it. For example,             
  506    Call to deprecated function db_drop_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, get  
         its schema driver, and call dropTable() on it. For example,               
  511    Call to deprecated function db_delete():                                  
         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 delete() on it. For example,                                         
  531    Call to deprecated function db_delete():                                  
         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 delete() on it. For example,                                         
 ------ -------------------------------------------------------------------------- 

                                                                                                                        
 [ERROR] Found 41 errors                                                                                                
                                                                                                                        

abramm’s picture

Status: Active » Needs work
abramm’s picture

abramm’s picture

sahana _n’s picture

Status: Needs work » Needs review
StatusFileSize
new16.5 KB

Removed deprecated methods please review.

rpayanm’s picture

StatusFileSize
new1.84 KB
new17.56 KB

I found these issues:

------ ----------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   data_search/data_search.module                                                                                                                 
 ------ ----------------------------------------------------------------------------------------------------------------------------------------------- 
  99     Call to deprecated function search_index():                                                                                                    
         in drupal:8.8.0 and is removed from drupal:9.0.0. Use                                                                                          
         \Drupal\search\SearchIndex::index() instead.                                                                                                   
  122    Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal::time()->getRequestTime();  
 ------ ----------------------------------------------------------------------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   src/Entity/TableConfig.php                                                                                                                     
 ------ ----------------------------------------------------------------------------------------------------------------------------------------------- 
  58     Call to deprecated constant REQUEST_TIME: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal::time()->getRequestTime();  
 ------ ----------------------------------------------------------------------------------------------------------------------------------------------- 
                                                                                                          
 [ERROR] Found 6 errors
rpayanm’s picture

  • valthebald committed 94a7deb on 8.x-1.x
    Issue #3088972 by rpayanm, Sahana _N: Drupal 9 plan
    
valthebald’s picture

Status: Needs review » Fixed

Committed to 8.x-1.x, thank you!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.