From 723ca8db6a0e9d43e64ef71d0b2afca0fc674122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 14 Nov 2024 15:17:40 +0100 Subject: [PATCH] Remove date validation on deathDate This change removes the `Assert\Date` validation on the `deathDate` property in the `Person` entity. The adjustment allows for more flexible input by not strictly enforcing the date format, which can resolve issues where the date string validation was previously causing errors. --- .changes/unreleased/Fixed-20241114-151730.yaml | 5 +++++ src/Bundle/ChillPersonBundle/Entity/Person.php | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Fixed-20241114-151730.yaml diff --git a/.changes/unreleased/Fixed-20241114-151730.yaml b/.changes/unreleased/Fixed-20241114-151730.yaml new file mode 100644 index 000000000..09bc5801a --- /dev/null +++ b/.changes/unreleased/Fixed-20241114-151730.yaml @@ -0,0 +1,5 @@ +kind: Fixed +body: Remove validation of date string on deathDate +time: 2024-11-14T15:17:30.804640253+01:00 +custom: + Issue: "" diff --git a/src/Bundle/ChillPersonBundle/Entity/Person.php b/src/Bundle/ChillPersonBundle/Entity/Person.php index 3bdfba767..4a0664652 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person.php @@ -209,7 +209,6 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI /** * The person's deathdate. */ - #[Assert\Date] #[Assert\GreaterThanOrEqual(propertyPath: 'birthdate')] #[Assert\LessThanOrEqual('today')] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_IMMUTABLE, nullable: true)]