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.
Problem/Motivation
Method "Symfony\Component\Validator\Validator\ValidatorInterface::validate()" will return "ConstraintViolationListInterface" as of its next major version. Doing the same in implementation "Drupal\Core\TypedData\Validation\RecursiveValidator" will be required when upgrading.
Method "Symfony\Component\Validator\Validator\ValidatorInterface::validateProperty()" will return "ConstraintViolationListInterface" as of its next major version. Doing the same in implementation "Drupal\Core\TypedData\Validation\RecursiveValidator" will be required when upgrading.
Method "Symfony\Component\Validator\Validator\ValidatorInterface::validatePropertyValue()" will return "ConstraintViolationListInterface" as of its next major version. Doing the same in implementation "Drupal\Core\TypedData\Validation\RecursiveValidator" will be required when upgrading.
Steps to reproduce
Proposed resolution
Add the "ConstraintViolationListInterface" type hint.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#5 | 3231682.patch | 2.12 KB | larowlan |
#2 | 3231682-2.patch | 2.12 KB | daffie |
Comments
Comment #2
daffie CreditAttribution: daffie commentedThe fix.
Comment #3
daffie CreditAttribution: daffie commentedI cannot find any instances in contrib were the class Drupal\Core\TypedData\Validation\RecursiveValidator is overridden or used in such a way that creates a BC break.
Part of the Symfony 6 in D10 initiative.
Comment #4
longwaveLooks OK to me.
Comment #5
larowlanRe-roll, patch above didn't apply anymore
Comment #6
alexpottCommitted 9d36d02 and pushed to 9.3.x. Thanks!