Problem/Motivation

Method "Symfony\Component\Validator\Context\ExecutionContextInterface::getObject()" will return "?object" as of its next major version. Doing the same in implementation "Drupal\Core\TypedData\Validation\ExecutionContext" will be required when upgrading.

Method "Symfony\Component\Validator\Context\ExecutionContextInterface::getMetadata()" will return "?MetadataInterface" as of its next major version. Doing the same in implementation "Drupal\Core\TypedData\Validation\ExecutionContext" will be required when upgrading.

Method "Symfony\Component\Validator\Context\ExecutionContextInterface::getGroup()" will return "?string" as of its next major version. Doing the same in implementation "Drupal\Core\TypedData\Validation\ExecutionContext" will be required when upgrading.

Method "Symfony\Component\Validator\Context\ExecutionContextInterface::getClassName()" will return "?string" as of its next major version. Doing the same in implementation "Drupal\Core\TypedData\Validation\ExecutionContext" will be required when upgrading.

Method "Symfony\Component\Validator\Context\ExecutionContextInterface::getPropertyName()" will return "?string" as of its next major version. Doing the same in implementation "Drupal\Core\TypedData\Validation\ExecutionContext" will be required when upgrading.

Method "Symfony\Component\Validator\Context\ExecutionContextInterface::getPropertyPath()" will return "string" as of its next major version. Doing the same in implementation "Drupal\Core\TypedData\Validation\ExecutionContext" will be required when upgrading.

Steps to reproduce

Proposed resolution

Add the type hints.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#2 3231689-2.patch1.33 KBdaffie
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

daffie created an issue. See original summary.

daffie’s picture

Status: Active » Needs review
FileSize
1.33 KB

The fix.

daffie’s picture

Priority: Normal » Critical
Issue tags: +Drupal 10

I could not find any instances were contrib is extending the class Drupal\Core\TypedData\Validation\ExecutionContext. The adding of the return type hints does not change anything as the methods already only returning what the added type hints are demanding. See: http://grep.xnddx.ru/search?text=ExecutionContext&filename=.

Part of the Symfony 6 in D10 initiative.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

The patch adds the typehints as per the deprecation.

  • larowlan committed 2eb9e5f on 9.3.x
    Issue #3231689 by daffie: [Symfony 6] Add type hints to Drupal\Core\...
larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Committed 2eb9e5f and pushed to 9.3.x. Thanks!

Status: Fixed » Closed (fixed)

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