Problem/Motivation

I got a Call to deprecated functions drupal_get_path() and file_create_url() running drupal-check.

 ------ -----------------------------------------------------------------------------
  Line   adminimal_theme.theme
 ------ -----------------------------------------------------------------------------
  45     Call to deprecated function drupal_get_path():
         in drupal:9.3.0 and is removed from drupal:10.0.0. Use
           \Drupal\Core\Extension\ExtensionPathResolver::getPath() instead.
  48     Call to deprecated function file_create_url():
         in drupal:9.3.0 and is removed from drupal:10.0.0.
           Use the appropriate method on \Drupal\Core\File\FileUrlGeneratorInterface
           instead.
  49     Call to deprecated function file_create_url():
         in drupal:9.3.0 and is removed from drupal:10.0.0.
           Use the appropriate method on \Drupal\Core\File\FileUrlGeneratorInterface
           instead.
 ------ -----------------------------------------------------------------------------

Steps to reproduce

$> drupal-check web/themes/contrib/adminimal_theme
 ------ -----------------------------------------------------------------------------
  Line   adminimal_theme.theme
 ------ -----------------------------------------------------------------------------
  45     Call to deprecated function drupal_get_path():
         in drupal:9.3.0 and is removed from drupal:10.0.0. Use
           \Drupal\Core\Extension\ExtensionPathResolver::getPath() instead.
  48     Call to deprecated function file_create_url():
         in drupal:9.3.0 and is removed from drupal:10.0.0.
           Use the appropriate method on \Drupal\Core\File\FileUrlGeneratorInterface
           instead.
  49     Call to deprecated function file_create_url():
         in drupal:9.3.0 and is removed from drupal:10.0.0.
           Use the appropriate method on \Drupal\Core\File\FileUrlGeneratorInterface
           instead.
 ------ -----------------------------------------------------------------------------

Proposed resolution

Fixes for:

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

fcertal created an issue. See original summary.

fcertal’s picture

Title: Fix call to deprecated function drupal_get_path() » Fix deprecated code report issues for 9.3.x
Issue summary: View changes
fcertal’s picture

fcertal’s picture

fcertal’s picture

Issue summary: View changes

guilherme-lima-almeida made their first commit to this issue’s fork.

fcertal’s picture

Assigned: Unassigned » fcertal

loopy1492’s picture

It looks like this is also being resolved in https://www.drupal.org/project/adminimal_theme/issues/3296538

loopy1492’s picture