Fix deprecated class constant of FileSystemInterface

Created on 3 October 2024, 2 months ago

Using the class constant EXISTS_REPLACE is deprecated in Drupal 10.3:

------ ---------------------------------------------------------------- 
  Line   src/Plugin/MediaThumbnail/MediaThumbnailSVG.php                 
 ------ ---------------------------------------------------------------- 
  82     Fetching deprecated class constant EXISTS_REPLACE of interface  
         Drupal\Core\File\FileSystemInterface:                           
         in drupal:10.3.0 and is removed from drupal:12.0.0. Use         
         \Drupal\Core\File\FileExists::Replace instead.                  
 ------ ---------------------------------------------------------------- 

Fixing this will probably require a new major release!

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany drubb Sindelfingen

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

Comments & Activities

  • Issue created by @drubb
  • I have replaced this deprecated constant. please refer to attached a patch

  • 🇩🇪Germany drubb Sindelfingen

    Hi ananya,

    thanks for your contribution! I appreciate it, however it's not that simple:

    The FileExists class was introduced in Drupal 10.3, but this module's 2.x branch has to support Drupal 9.3 upwards.
    The clean way to solve this is introducing a new major branch 3.x supporting Drupal 10.3 upwards, or maybe some
    11.x / 12.x version.

    I don't want to implement this currently, because new features would then need to be backported. As Drupal 12 is still way to go,
    there's no urgency to solve this. So I'll postpone this issue for now.

Production build 0.71.5 2024