watchdog_exception() deprecated

Created on 5 October 2023, 9 months ago
Updated 22 May 2024, about 1 month ago

Problem/Motivation

The function watchdog_exception() is deprecated, and replaced by \Drupal\Core\Utility\Error::logException()

Steps to reproduce

$ vendor/bin/drupal-check --drupal-root $CI_PROJECT_DIR/$_WEB_ROOT $CI_PROJECT_DIR/$_WEB_ROOT/modules/custom/$CI_PROJECT_NAME

 ------ ----------------------------------------------------------- 
  Line   src/Service/RebuildIpAddressService.php                    
 ------ ----------------------------------------------------------- 
  59     Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
 ------ ----------------------------------------------------------- 
 ------ ----------------------------------------------------------- 
  Line   src/Service/RebuildRouteService.php                        
 ------ ----------------------------------------------------------- 
  64     Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  78     Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  98     Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
 ------ ----------------------------------------------------------- 
 ------ ----------------------------------------------------------- 
  Line   src/Service/TrackerService.php                             
 ------ ----------------------------------------------------------- 
  210    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
 ------ ----------------------------------------------------------- 

 ------ ----------------------------------------------------------- 
  Line   visitors.install                                           
 ------ ----------------------------------------------------------- 
  393    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  551    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  571    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  590    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  609    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  628    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  647    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  666    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  685    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  704    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  723    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  777    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  912    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  926    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  1044   Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  2631   Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
 ------ ----------------------------------------------------------- 
 ------ ----------------------------------------------------------- 
  Line   visitors.module                                            
 ------ ----------------------------------------------------------- 
  69     Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  324    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  374    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  396    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  443    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
  479    Call to deprecated function watchdog_exception():          
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use    
           Use \Drupal\Core\Utility\Error::logException() instead.  
 ------ ----------------------------------------------------------- 
 ------ ---------------------------------------------------------------- 
  Line   visitors_geoip/src/EventSubscriber/GeoIpVisitLogSubscriber.php  
 ------ ---------------------------------------------------------------- 
  86     Call to deprecated function watchdog_exception():               
         in drupal:10.1.0 and is removed from drupal:11.0.0. Use         
           Use \Drupal\Core\Utility\Error::logException() instead.       
 ------ ---------------------------------------------------------------- 

Proposed resolution

Remaining tasks

This cannot be merged until Drupal 9 is End of Life.

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇺🇸United States bluegeek9

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024