PHP 8.2 compatibility

Created on 24 May 2023, over 1 year ago
Updated 6 December 2023, 12 months ago

While running drupal-check over local with php I've found below warnings:

 ------ ---------------------------------------------------------------- 
  Line   memcache_admin/src/Controller/MemcacheStatisticsController.php  
 ------ ---------------------------------------------------------------- 
  59     PHPDoc tag @param references unknown parameter: $form_builder   
  95     PHPDoc tag @var has invalid value ($memcache                    
         \Drupal\memcache\DrupalMemcacheInterface): Unexpected token     
         "$memcache", expected type at offset 9                          
  104    Cannot call method getMemcache() on                             
         bool|Drupal\memcache\DrupalMemcacheInterface.                   
  107    Cannot call method getMemcache() on                             
         bool|Drupal\memcache\DrupalMemcacheInterface.                   
  114    Variable $raw_stats might not be defined.                       
  140    Cannot call method stats() on                                   
         bool|Drupal\memcache\DrupalMemcacheInterface.                   
  143    Cannot call method stats() on                                   
         bool|Drupal\memcache\DrupalMemcacheInterface.                   
  180    Cannot call method getBins() on                                 
         bool|Drupal\memcache\DrupalMemcacheInterface.                   
  233    Cannot call method getBins() on                                 
         bool|Drupal\memcache\DrupalMemcacheInterface.                   
  285    Cannot call method getBins() on                                 
         bool|Drupal\memcache\DrupalMemcacheInterface.                   
  291    Cannot call method statsTypes() on                              
         bool|Drupal\memcache\DrupalMemcacheInterface.                   
  292    Cannot call method statsTypes() on                              
         bool|Drupal\memcache\DrupalMemcacheInterface.                   
  351    Cannot call method stats() on                                   
         bool|Drupal\memcache\DrupalMemcacheInterface.                   
  381    Cannot call method getBins() on                                 
         bool|Drupal\memcache\DrupalMemcacheInterface.                   
 ------ ---------------------------------------------------------------- 

 ------ ------------------------------------------------------------ 
  Line   memcache_admin/src/Event/MemcacheStatsEvent.php             
 ------ ------------------------------------------------------------ 
  85     PHPDoc tag @param references unknown parameter: $raw_stats  
  87     Call to an undefined method                                 
         Drupal\memcache\DrupalMemcacheInterface::stats().           
 ------ ------------------------------------------------------------ 

 ------ ---------------------------------------------------------------- 
  Line   memcache_admin/src/EventSubscriber/MemcacheAdminSubscriber.php  
 ------ ---------------------------------------------------------------- 
  61     Cannot call method requestStats() on                            
         bool|Drupal\memcache\DrupalMemcacheInterface.                   
 ------ ---------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------- 
  Line   memcache_admin/src/EventSubscriber/MemcacheServerStatsSubscriber.php  
 ------ ---------------------------------------------------------------------- 
  127    Variable $data might not be defined.                                  
  131    Variable $data might not be defined.                                  
  135    Variable $data might not be defined.                                  
  141    Variable $data might not be defined.                                  
  145    Variable $data might not be defined.                                  
  149    Variable $data might not be defined.                                  
  153    Variable $data might not be defined.                                  
  157    Variable $data might not be defined.                                  
  163    Variable $data might not be defined.                                  
  167    Variable $data might not be defined.                                  
 ------ ---------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------- 
  Line   memcache_admin/src/Stats/MemcacheStatsObject.php                      
 ------ ---------------------------------------------------------------------- 
  92     Comparison operation "==" between (array|float|int) and 0 results in  
         an error.                                                             
  129    Comparison operation "==" between (array|float|int) and 0 results in  
         an error.                                                             
  135    Variable $stats in empty() is never defined.                          
  139    Undefined variable: $stats                                            
 ------ ---------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------- 
  Line   tests/src/Kernel/MemcacheBackendTest.php                               
 ------ ----------------------------------------------------------------------- 
  29     Class Drupal\memcache\MemcacheBackendFactory constructor invoked with  
         4 parameters, 3 required.                                              
 ------ ----------------------------------------------------------------------- 
📌 Task
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇮🇳India rajeshreeputra Pune

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

Comments & Activities

Production build 0.71.5 2024