Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291621

Remove $context properties from ConstraintValidators

$
0
0

Problem/Motivation

In CommentNameConstraintValidator, EntityTestCompositeConstraintValidator and EntityTestEntityLevelValidator there is the following declaration:

  /**
   * Validator 2.5 and upwards compatible execution context.
   *
   * @var \Symfony\Component\Validator\Context\ExecutionContextInterface
   */
  protected $context;

The parent property is correctly typed already. Symfony 7 adds an actual typehint here, which causes type issues.

Steps to reproduce

Proposed resolution

Remove the property and rely on the parent class.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 291621

Trending Articles