From 280641d9ad5ae8c9c56100358dcb4832e9e7162d Mon Sep 17 00:00:00 2001 From: Xavier Leune Date: Wed, 15 Jan 2025 16:30:43 +0100 Subject: [PATCH] The constraint UniqueEntity can now be used with an attribute on your class --- CHANGELOG | 3 +++ src/TingBundle/Validator/Constraints/UniqueEntity.php | 1 + 2 files changed, 4 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 45ca53c..00b8589 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +3.9.0 (unreleased): + * The constraint "UniqueEntity" can now be used with an attribute on your class + 3.8.2 (2025-01-09): * Fix: better detection for Uuid subclasses in autowiring diff --git a/src/TingBundle/Validator/Constraints/UniqueEntity.php b/src/TingBundle/Validator/Constraints/UniqueEntity.php index d4c65e2..a666f60 100644 --- a/src/TingBundle/Validator/Constraints/UniqueEntity.php +++ b/src/TingBundle/Validator/Constraints/UniqueEntity.php @@ -32,6 +32,7 @@ * @Annotation * @Target({"CLASS", "ANNOTATION"}) */ +#[\Attribute(\Attribute::TARGET_CLASS)] class UniqueEntity extends Constraint { /**