Problem/Motivation

Method "Symfony\Component\Validator\Validator\ContextualValidatorInterface::atPath()" will return "static" as of its next major version. Doing the same in implementation "Drupal\Core\TypedData\Validation\RecursiveContextualValidator" will be required when upgrading.

Method "Symfony\Component\Validator\Validator\ContextualValidatorInterface::getViolations()" will return "ConstraintViolationListInterface" as of its next major version. Doing the same in implementation "Drupal\Core\TypedData\Validation\RecursiveContextualValidator" will be required when upgrading.

Method "Symfony\Component\Validator\Validator\ContextualValidatorInterface::validateProperty()" will return "static" as of its next major version. Doing the same in implementation "Drupal\Core\TypedData\Validation\RecursiveContextualValidator" will be required when upgrading.

Method "Symfony\Component\Validator\Validator\ContextualValidatorInterface::validatePropertyValue()" will return "static" as of its next major version. Doing the same in implementation "Drupal\Core\TypedData\Validation\RecursiveContextualValidator" 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

CommentFileSizeAuthor
#2 3233474-2.patch2.14 KBdaffie

Comments

daffie created an issue. See original summary.

daffie’s picture

Status: Active » Needs review
StatusFileSize
new2.14 KB

The return type hint "static" is only supported from PHP version 8.0 and therefor can only be committed to the 10.0 branch.

daffie’s picture

Version: 9.3.x-dev » 10.0.x-dev
longwave’s picture

Status: Needs review » Reviewed & tested by the community

This is OK to go into 10.0.x only.

  • catch committed 4d57608 on 10.0.x
    Issue #3233474 by daffie: [Symfony 6] Add the type hints to the methods...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 10.0.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.