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