Merge branch 'fix-accompanying-period-opening' into bootstrap-api

This commit is contained in:
2021-05-06 16:02:13 +02:00
3 changed files with 13 additions and 5 deletions

View File

@@ -401,7 +401,7 @@ class AccompanyingPeriod
{
$participation = $this->getOpenParticipationContainsPerson($person);
if (! null === $participation) {
if ($participation instanceof AccompanyingPeriodParticipation) {
$participation->setEndDate(new \DateTimeImmutable('now'));
}

View File

@@ -390,7 +390,7 @@ class Person implements HasCenterInterface
*
* @deprecated since 1.1 use `getOpenedAccompanyingPeriod instead
*/
public function getCurrentAccompanyingPeriod() : AccompanyingPeriod
public function getCurrentAccompanyingPeriod() : ?AccompanyingPeriod
{
return $this->getOpenedAccompanyingPeriod();
}
@@ -1011,7 +1011,7 @@ class Person implements HasCenterInterface
* By default, the addresses are ordered by date, descending (the most
* recent first)
*/
public function getAddresses(): ArrayCollection
public function getAddresses(): Collection
{
return $this->addresses;
}