Problem/Motivation

ConfigProviderBase provides two unnecessary methods that wrap Drupal services that should be removed (especially after the dependency injection improvements made in #3457459: GitLabCI: Fix existing PHPCS & PHPStan issues):

  • ConfigProviderBase::drupalGetPath()
  • ConfigProviderBase::drupalGetProfile()

Steps to reproduce

Proposed resolution

  • Deprecate methods ahead of next release/pre-release.
  • Remove methods ahead of a future release.

Remaining tasks

User interface changes

API changes

  • ConfigProviderBase::drupalGetPath() will be deprecated (and later removed).
  • ConfigProviderBase::drupalGetProfile() will be deprecated (and later removed).

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

joegraduate created an issue. See original summary.

joegraduate’s picture

Issue summary: View changes

joegraduate’s picture

joegraduate’s picture

Status: Postponed » Needs review
joegraduate’s picture

Assigned: joegraduate » Unassigned
trackleft2’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, as long as we remember to include it in the 3.0.0-alpha2 release.

tadean’s picture

Verified that implementers of ConfigProviderBase receive the expected deprecation warnings:

 ------ ----------------------------------------------------------------------------------------------------------------- 
  Line   web/modules/custom/test_provider/src/Plugin/ConfigProvider/TestConfigProvider.php  
 ------ ----------------------------------------------------------------------------------------------------------------- 
  332    Call to deprecated method drupalGetProfile() of class Drupal\config_provider\Plugin\ConfigProviderBase:          
         in config_provider:3.0.0-alpha2 and is removed from config_provider:3.1.0.                                       
           ConfigProviderBase::installProfile should be used instead.                                                     
  333    Call to deprecated method drupalGetPath() of class Drupal\config_provider\Plugin\ConfigProviderBase:             
         in config_provider:3.0.0-alpha2 and is removed from config_provider:3.1.0.                                       
           ConfigProviderBase::extensionPathResolver::getPath() should be used                                            
           instead.                                                                                                       
 ------ -----------------------------------------------------------------------------------------------------------------
joegraduate’s picture

tadean’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @joegraduate !

Status: Fixed » Closed (fixed)

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