From 5ca6a9939cf6eec0e628706e9f1002b764717d6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 5 Jul 2018 12:47:31 +0200 Subject: [PATCH] fix error when having two address at same date --- Entity/Person.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Entity/Person.php b/Entity/Person.php index 92220091e..cf88be3bb 100644 --- a/Entity/Person.php +++ b/Entity/Person.php @@ -723,11 +723,11 @@ class Person implements HasCenterInterface { public function isAddressesValid(ExecutionContextInterface $context) { if ($this->hasTwoAdressWithSameValidFromDate()) { - $context->addViolationAt( - 'addresses', - 'Two addresses has the same validFrom date', - array() - ); + $context + ->buildViolation('Two addresses has the same validFrom date') + ->atPath('addresses') + ->addViolation() + ; } }