[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        | -
could we move the logic adding the violation to a protected method and make the legacy validator extend the newer one and overwrite the protected method ? this would be easier to maintain than duplicating all the valdiation logic, and then having to remember that we need to keep them in sync