Skip to content
GitLab
  • Explore
  • Sign in
  • DevelopmentDevelopment
  • Drupal
  • Issues
  • #167

Drupal service 'site.path' is deprecated in drupal 9 and will be removed in drupal 10

In https://github.com/civicrm/civicrm-core/blob/master/setup/src/Setup/DrupalUtil.php#L23 it calls \Drupal::service('site.path');.

But I'm wondering why that function getDrupalSiteDir() even exists and why it's not part of CRM_Utils_System_X. Maybe a timing issue since civi isn't installed yet at that point?

Anyway the relevant drupal issue is https://www.drupal.org/project/drupal/issues/3074585#comment-13220446.

Because of the (bleep) @trigger_error usage that drupal uses though it only comes up when running unit tests in drupal's own testing environment (until drupal 10 when it will hard fail, effectively nulling the effect of outputting a deprecation for most people).

Edited Oct 11, 2021 by DaveD
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking