FileSystemInterface replace behavior constants are deprecated

Created on 1 October 2024, 3 months ago

Problem/Motivation

FileSystemInterface replace behavior constants are deprecated. Currently in applyToImage function in entity class ImageAPIOptimizePipeline we have

if ($image_changed) {
        // Copy the temporary file back over the original image.
        \Drupal::service('file_system')->move($temp_image_uri, $image_uri, FileSystemInterface::EXISTS_REPLACE);
      }

Steps to reproduce

Proposed resolution

Should be replaced with

if ($image_changed) {
        // Copy the temporary file back over the original image.
        \Drupal::service('file_system')->move($temp_image_uri, $image_uri, FileExists::Replace);
      }
🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇵🇰Pakistan hmdnawaz

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024