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\Mapping\Factory\MetadataFactoryInterface::getMetadataFor()" will return "MetadataInterface" 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\Mapping\Factory\MetadataFactoryInterface::hasMetadataFor()" will return "bool" 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 return type hints.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#2 | 3233481-2.patch | 1.47 KB | daffie |
Comments
Comment #2
daffie CreditAttribution: daffie commentedI could not find any instances where the methods are overridden in contrib. See: http://grep.xnddx.ru/search?text=public+function+getMetadataFor%28&filen... and http://grep.xnddx.ru/search?text=public+function+hasMetadataFor%28&filen...
Comment #3
longwaveLooks good to me.
Comment #5
larowlanCommitted 95c9835 and pushed to 9.3.x. Thanks!