Symfony2 Assert\Expression annotation doesn't support Constants
问题 Generally I use Constants in all of annotation based places e.g. annotations, route and assert annotations , but in Assert\Expression it throws Variable "EntityInterface" is not valid around position 26. Is this a bug or is a special rare case ? <?php /** * @var string * * @ORM\Column(name="id_number", type="string", length=11, nullable=true) * @Assert\Expression( * "this.getNationality() == EntityInterface::COUNTRY_DEFAULT_VALUE and value != null", * message = "form.user.validation.id_number