Problem/Motivation

As per File Entity API:
https://api.drupal.org/api/drupal/core%21modules%21file%21src%21Entity%2...
File entities returning the URL to the physical file in File::url() is deprecated, use $file->createFileUrl() instead. See https://www.drupal.org/node/3019830

Proposed resolution
We will need to replace all:
$file->url();
to:
$file->createFileUrl()

Comments

mahmoud-zayed created an issue. See original summary.

  • mahmoud-zayed committed 30aec8f on 1.x
    Issue #3158047 by mahmoud-zayed: D9 Replace deprecated File URL Method.
    
mahmoud-zayed’s picture

Assigned: mahmoud-zayed » Unassigned
Status: Needs work » Fixed

Added to 1.3.1

mahmoud-zayed’s picture

Status: Fixed » Closed (fixed)
mindhunter75’s picture

You're the best Mahmoud-Zayed, the latest module works great now in Drupal9!!! Many thanks and kind regards.