[Validator] backport type fixes

This commit is contained in:
Tobias Schultze 2021-07-16 13:50:32 +02:00
parent 32c46c018f
commit 969b28ec11
2 changed files with 2 additions and 2 deletions

View File

@ -153,7 +153,7 @@ class ExecutionContext implements ExecutionContextInterface
$this->value = $value;
$this->object = $object;
$this->metadata = $metadata;
$this->propertyPath = (string) $propertyPath;
$this->propertyPath = $propertyPath;
}
/**

View File

@ -46,7 +46,7 @@ class ConstraintViolationBuilder implements ConstraintViolationBuilderInterface
/**
* @param string $message The error message as a string or a stringable object
*/
public function __construct(ConstraintViolationList $violations, Constraint $constraint, $message, array $parameters, $root, $propertyPath, $invalidValue, TranslatorInterface $translator, $translationDomain = null)
public function __construct(ConstraintViolationList $violations, ?Constraint $constraint, $message, array $parameters, $root, $propertyPath, $invalidValue, TranslatorInterface $translator, $translationDomain = null)
{
$this->violations = $violations;
$this->message = $message;