Problem/Motivation
PHP Fatal error: Declaration of Drupal\Core\TypedData\Validation\ExecutionContext::setGroup($group) must be compatible with Symfony\Component\Validator\Context\ExecutionContextInterface::setGroup(?string $group): void in /Users/ankit.pathak/Documents/Projects/FeatureRepo/acmsheadless/docroot/core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php on line 146
PHP 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 /Users/ankit.pathak/Documents/Projects/FeatureRepo/acmsheadless/docroot/core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php on line 136
PHP Fatal error: Declaration of Drupal\Core\TypedData\Validation\ExecutionContext::setConstraint(Symfony\Component\Validator\Constraint $constraint) must be compatible with Symfony\Component\Validator\Context\ExecutionContextInterface::setConstraint(Symfony\Component\Validator\Constraint $constraint): void in /Users/ankit.pathak/Documents/Projects/FeatureRepo/acmsheadless/docroot/core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php on line 153
PHP Fatal error: Declaration of Drupal\Core\TypedData\Validation\ExecutionContext::markGroupAsValidated($cache_key, $group_hash) must be compatible with Symfony\Component\Validator\Context\ExecutionContextInterface::markGroupAsValidated(string $cacheKey, string $groupHash): void in /Users/ankit.pathak/Documents/Projects/FeatureRepo/acmsheadless/docroot/core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php on line 286
PHP Fatal error: Declaration of Drupal\Core\TypedData\Validation\ExecutionContext::markConstraintAsValidated($cache_key, $constraint_hash) must be compatible with Symfony\Component\Validator\Context\ExecutionContextInterface::markConstraintAsValidated(string $cacheKey, string $constraintHash): void in /Users/ankit.pathak/Documents/Projects/FeatureRepo/acmsheadless/docroot/core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php on line 265
PHP Fatal error: Declaration of Drupal\Core\TypedData\Validation\ExecutionContext::markObjectAsInitialized($cache_key) must be compatible with Symfony\Component\Validator\Context\ExecutionContextInterface::markObjectAsInitialized(string $cacheKey): void in /Users/ankit.pathak/Documents/Projects/FeatureRepo/acmsheadless/docroot/core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php on line 300

Steps to reproduce
Run drush site:install
PHP 8.2 and Drupal version: 10.0.9
Proposed resolution
Fix php fatal error with respective return types
| Comment | File | Size | Author |
|---|---|---|---|
| Screenshot 2023-06-05 at 8.51.49 AM.png | 210.12 KB | ankitv18 |
Issue fork drupal-3364801
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
ankitv18 commentedComment #3
ankitv18 commentedComment #5
cilefen commentedThis looks like a possible duplicate. Did you update Symfony components to 6.3?
Comment #6
ankitv18 commentedYes, my composer having symfony 6.3 with D10.0.9 (drupal/core package) and I can see these changes are already pushed into D10.1.x-dev branch.
Comment #8
rajeshreeputraRebased with MR!4105 site installs fine with Drupal 10.0.9 and symfony components 6.3!
Comment #9
cilefen commentedI don’t know if those will be backported. If not using core-recommended it is required to manually specify the symfony dependencies.
Comment #10
cilefen commentedI am closing this as a duplicate of #3363222: Update to Symfony 6.3. You can inquire about backporting there.