Problem/Motivation

Drupal 9.3.x has deprecated drupal_get_path().

Steps to reproduce

Use webform on Drupal 9.3.x

Proposed resolution

Fix code in ways that are still compatible with prior versions of Drupal.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork webform-3250330

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Title: Remove usages of deprecated code for Drupal 9.3 » Remove usages of drupal_get_path()

Let's make this only about drupal_get_path - the date callback stuff is handled in #3221398: [Drupal 9.x] Update use of date_time_callbacks and date_date_callbacks in Webform

alexpott’s picture

Issue summary: View changes
alexpott’s picture

alexpott’s picture

Status: Active » Needs review
alexpott’s picture

I've reviewed the patch. There are many places where there's no need to use a service to determine the path of a module because webform stuff is being referenced. We can use __DIR__ - and this has the nice advantage of being quicker and integrating much better with IDEs so you can click on the file and go to it.

jrockowitz’s picture

Title: Remove usages of drupal_get_path() » [Drupal 9.x] Remove usages of drupal_get_path()
Parent issue: » #3249740: [META] Ensure webform compatibility with Drupal 9 only.
alexpott’s picture

@jrockowitz this change is completely compatible with Drupal 8.9 fwiw.

alexpott’s picture

Now that 6.x passes tests on 9.3.x I think this one is ready.

jrockowitz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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