From 1d8f25e2c86ccfc88349c11b2ede9f3c21fb5da0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 8 Jul 2022 15:04:06 +0200 Subject: [PATCH] use the date parameter in deprecated method getLastAddress --- src/Bundle/ChillPersonBundle/Entity/Person.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Entity/Person.php b/src/Bundle/ChillPersonBundle/Entity/Person.php index 7da08d740..d0be5752a 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person.php @@ -1184,7 +1184,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI } /** - * @deprecated Use `getCurrentPersonAddress` instead + * @deprecated Use @link{Person::getCurrentPersonAddress} or @link{Person::getCurrentHouseholdAddress} instead * * @throws Exception * @@ -1192,7 +1192,9 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI */ public function getLastAddress(?DateTime $from = null) { - return $this->getCurrentPersonAddress(); + return $this->getCurrentHouseholdAddress( + null !== $from ? DateTimeImmutable::createFromMutable($from) : null + ); } public function getLastName(): string