[DoctrineBridge] Changed UniqueEntityValidator to use the 2.5 Validation API

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #11578
| License       | MIT
| Doc PR        | -
we generally don't use ``@author`` on tests (and ``@since`` are not really needed for tests either IMO)