publicfunctiontestAddCompositeConstraintRejectsNestedPropertyConstraints() { $this->expectException(ConstraintDefinitionException::class); $this->expectExceptionMessage('The constraint "Symfony\Component\Validator\Tests\Fixtures\PropertyConstraint" cannot be put on classes.');