<?php

namespace phenaproxima\DomainConstraint;

use Symfony\Component\Validator\Constraint;

class Domain extends Constraint {

  public $message = '"%domain" is not a valid domain name.';

}

<?php

namespace phenaproxima\DomainConstraint;

use Symfony\Component\Validator\Constraint;

/**
 * @Annotation
 */
class Domain extends Constraint {

  public $message = '"%domain" is not a valid domain name.';

}

Add missing @Annotation to constraint
Add missing @Annotation to constraint