Replace deprecated call to deprecated method getFromDriverName() of class Drupal\Core\Extension\DatabaseDriverList

Created on 25 August 2023, over 1 year ago

Problem/Motivation

As (soon to be) discovered by mglaman/phpstan-drupal 1.2.0 (see 📌 Bump mglaman/phpstan-drupal to latest to make daily "updated deps" QA run pass again Fixed ), we are using some deprecated functionality throughout Drupal core.

This issue is for dealing with:

 ------ ---------------------------------------------------------------- 
  Line   core/includes/install.core.inc                                  
 ------ ---------------------------------------------------------------- 
  975    Call to deprecated method getFromDriverName() of class          
         Drupal\Core\Extension\DatabaseDriverList:                       
         in drupal:10.2.0 and is removed from drupal:11.0.0. Use         
           DatabaseDriverList::get() instead, passing a database driver  
         namespace.                                                      
 ------ ---------------------------------------------------------------- 

and

 ------ ---------------------------------------------------------------- 
  Line   core/lib/Drupal/Core/Extension/DatabaseDriverList.php           
 ------ ---------------------------------------------------------------- 
  136    Call to deprecated method getFromDriverName() of class          
         Drupal\Core\Extension\DatabaseDriverList:                       
         in drupal:10.2.0 and is removed from drupal:11.0.0. Use         
           DatabaseDriverList::get() instead, passing a database driver  
         namespace.                                                      
 ------ ---------------------------------------------------------------- 

Note: Depending on the landing of 📌 Bump mglaman/phpstan-drupal to latest to make daily "updated deps" QA run pass again Fixed before the landing of this issue, we also might need to remove two suppressions from core/phpstan-baseline.neon

Steps to reproduce

Proposed resolution


Upon closer inspection, both calls detected above were added/changed in Introduce database driver extensions and autoload database drivers' dependencies Fixed to accommodate the deprecations in that issue.

Let's keep these two suppressions in the baseline until they will disappear in d11.0.0.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Closed: won't fix

Version

11.0 🔥

Component
Database 

Last updated 2 days ago

  • Maintained by
  • 🇳🇱Netherlands @daffie
Created by

🇳🇱Netherlands spokje

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

Comments & Activities

Production build 0.71.5 2024