Closed
Description
Symfony version(s) affected: 4.4.0
Description
In Symfony 4.3.4 Symfony\Component\Validator\ConstraintViolationInterface::getMessage()
returns string
.
In Symfony 4.4.0 it returns string|object
.
Widening return types is a BC break that breaks contract for consumers.
Caught by PHPStan:
Parameter #1 $message of class InvalidArgumentException constructor expects string, object|string given.