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
type data

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

CommentFileSizeAuthor
Screenshot 2023-06-05 at 8.51.49 AM.png210.12 KBankitv18

Issue fork drupal-3364801

Command icon 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

ankitv18 created an issue. See original summary.

ankitv18’s picture

Version: 10.1.x-dev » 10.0.x-dev
ankitv18’s picture

Issue summary: View changes

cilefen’s picture

This looks like a possible duplicate. Did you update Symfony components to 6.3?

ankitv18’s picture

Status: Postponed (maintainer needs more info) » Active

Yes, 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.

Rajeshreeputra made their first commit to this issue’s fork.

rajeshreeputra’s picture

Rebased with MR!4105 site installs fine with Drupal 10.0.9 and symfony components 6.3!

cilefen’s picture

Status: Active » Postponed (maintainer needs more info)

I don’t know if those will be backported. If not using core-recommended it is required to manually specify the symfony dependencies.

cilefen’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

I am closing this as a duplicate of #3363222: Update to Symfony 6.3. You can inquire about backporting there.