Problem/Motivation

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

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

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

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

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

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

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

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

Steps to reproduce

Proposed resolution

Add return type hints.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#6 3233479-6-10.0.x.patch4.57 KBlongwave
#2 3233479-2.patch2.37 KBdaffie

Comments

daffie created an issue. See original summary.

daffie’s picture

Status: Active » Needs review
StatusFileSize
new2.37 KB

This patch has to wait for the 10.0 branch as the "static" return type hints is only supported on PHP version 8.0.

daffie’s picture

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

Status: Needs review » Reviewed & tested by the community

We have deprecated ConstraintViolationBuilder for removal in 10.0.x but as we are upgrading to SF5.4 for alpha1 without removing deprecations, I think we have to commit this first to make the deprecation listener happy and then remove it later.

catch’s picture

Status: Reviewed & tested by the community » Needs work

Needs a re-roll for 10.0.x

longwave’s picture

Status: Needs work » Needs review
StatusFileSize
new4.57 KB

Rerolled.

catch’s picture

Status: Needs review » Reviewed & tested by the community

Re-roll looks fine back to RTBC.

  • catch committed e4f1b9c on 10.0.x
    Issue #3233479 by daffie, longwave: [Symfony 6] Add type hints to the...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed e4f1b9c and pushed to 10.0.x. Thanks!

Status: Fixed » Closed (fixed)

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