Replace file_create_url() (removed from Drupal 10) with file_url_generator service

Created on 27 October 2023, about 1 year ago

Problem/Motivation

file_create_url() was deprecated in drupal:9 and is removed from drupal:10

Steps to reproduce

The function file_create_url() is being used in Drupal\lunr\EventSubscriber\TomePathSubscriber->collectPaths(), and causes the following error in Drupal 10 when tome is used:

Error: Call to undefined function Drupal\lunr\EventSubscriber\file_create_url() in Drupal\lunr\EventSubscriber\TomePathSubscriber->collectPaths() (line 57 of /var/www/docroot/modules/contrib/lunr/src/EventSubscriber/TomePathSubscriber.php).

Proposed resolution

Replace the file_create_url() with file_url_generator service using dependency injection.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mikegodin

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

Comments & Activities

Production build 0.71.5 2024