getStartDate(); $end = $value->getEndDate(); if (null === $start || null === $end || $end >= $start) { return; } $this->context->buildViolation($constraint->message) ->atPath($constraint->atPath) ->addViolation(); } }