Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
According to OOP best practice and the coding standards image.module should be hinting with an interface instead of with a class. (I don't know if there is a meta issue for this already)
Change the use statement at the top from
use Drupal\file\Entity\File;
to
use Drupal\file\FileInterface;
and change all the type hints from
File
to
FileInterface
Comments
Comment #3
michaellenahan CreditAttribution: michaellenahan at erdfisch commentedComment #4
karthikkumarbodu CreditAttribution: karthikkumarbodu as a volunteer and at Axelerant commentedComment #6
karthikkumarbodu CreditAttribution: karthikkumarbodu as a volunteer and at Axelerant commentedComment #8
karthikkumarbodu CreditAttribution: karthikkumarbodu as a volunteer and at Axelerant commentedComment #10
karthikkumarbodu CreditAttribution: karthikkumarbodu as a volunteer and at Axelerant commentedComment #12
svetoslav.dragoev CreditAttribution: svetoslav.dragoev commentedCounted from today, Me (Svetoslav Dragoev), Nevena Kostova and Yasen Ivanov would be taking up the task. God speed all!
Comment #13
svetoslav.dragoev CreditAttribution: svetoslav.dragoev commentedWe've provided the patch over the image.module.
Comment #14
somepal CreditAttribution: somepal commentedreviewed
Comment #15
somepal CreditAttribution: somepal commentedComment #17
larowlanused
grep -Er " ?File(;| |\(|:)\$?" core/modules/image/
to find any remaining references that needed update - found none.Committed as d361241 and pushed to 8.5.x
Comment #18
larowlan