Update UniqueValidator.php

        $object     = $this->context->getRoot();
        $className  = get_class($object);

are not needed because Symfony\Component\Validator\ExecutionContext provides a getClassName() method. Also, $this->context->getRoot() was returning a Form object, which does not have the TABLE_MAP constant defined.