ExecutionContext::setNode() method not compatible with symfony/validator interface

Created on 31 May 2023, about 1 year ago
Updated 29 August 2023, 9 months ago

Problem/Motivation

At the installation of Drupal, after the step "Configure site", i get the error :

Fatal error: Declaration of Drupal\Core\TypedData\Validation\ExecutionContext::setNode($value, $object, ?Symfony\Component\Validator\Mapping\MetadataInterface $metadata, $propertyPath) must be compatible with Symfony\Component\Validator\Context\ExecutionContextInterface::setNode(mixed $value, ?object $object, ?Symfony\Component\Validator\Mapping\MetadataInterface $metadata, string $propertyPath): void in /var/www/html/drupal-core/core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php on line 136

Before to start the installation i've run the commande composer install (no problem) but if i run the command composer update, many symfony components are updated to 6.3 version.

My environnement :
PHP 8.2
Drupal 10.0.10-dev

Steps to reproduce

  1. Clone the code source and checkout to the branch : 10.0.x
  2. Run command : composer install (optionnal)
  3. Run command : composer update
  4. Go to installation interface, Langue : English, Profil : Standard, Database : MariaDB
  5. Validate "Configure site" form
  6. Fatal Error

Proposed resolution

Add return type to the methods of Drupal class ExecutionContext : see patch
May be lock the dependencies version of Symfony componants to < 6.3.0 ?

πŸ’¬ Support request
Status

Closed: works as designed

Version

10.0 ✨

Component
Typed dataΒ  β†’

Last updated 18 days ago

  • Maintained by
  • πŸ‡¦πŸ‡ΉAustria @fago
Created by

πŸ‡«πŸ‡·France rmpereira

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024