Remove deprecated hook_file_validate() and implement Constraint plugins

Created on 24 February 2024, 10 months ago

Problem/Motivation

The file validation process has evolved in Drupal 10.2, with this change record: https://www.drupal.org/node/3363700

hook_file_validate is deprecated and replaced with a \Drupal\file\Validation\FileValidationEvent that is dispatched by \Drupal\file\Validation\FileValidator::validate() .

Proposed resolution

Implement an EventSubscriber to add the custom validation code that can add to the ConstraintViolationList.

Remaining tasks

Implement the new API.

User interface changes

TBC.

API changes

Breaking change?

Data model changes

None.

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom manarth

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

Comments & Activities

Production build 0.71.5 2024