drupal_get_path is deprecated in 9.3.0

Created on 2 January 2022, almost 3 years ago
Updated 21 June 2023, over 1 year ago

Problem/Motivation

drupal_get_path is deprecated in 9.3.0

Steps to reproduce

Run automated tests and observe deprecation notices.

Proposed resolution

Replace with \Drupal::service('extension.path.resolver')->getPath()

Remaining tasks

Determine strategy for integrating with 9.0.x, 9.1.x, and 9.2x.

Although a cache rebuild should cause the service arguments to update, probably an update hook should be provided.

User interface changes

None.

API changes

The config_actions service signature includes an additional parameter.

ConfigActionsPluginBase constructor includes an additional parameter. Perhaps that should be defaulted and a deprecation notice provided if people are calling the constructor without the new parameter

Data model changes

None.

πŸ“Œ Task
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States kdebisschop

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States mpotter

    Not sure why this got assigned. Issues should only be assigned to people doing the work. These changes will be rolled into issue #3196224 and I'll add credit for kdebisschop

    kdebisschop: see the notes about an alternative way to handle the deprecated drupal_get_path, but I think it covers what you have here.

Production build 0.71.5 2024