From d7c7d8eaee3fc7719e9e267f71fb0bd3d182c48b Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Wed, 14 Dec 2022 15:43:59 +0100 Subject: [PATCH] Do not break during import on openingHours presence The objects might have an openingHours property. This would break as our internal name would match during symfony serialization. We now use the expected property name. --- Classes/Domain/Import/Entity/Place.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/Domain/Import/Entity/Place.php b/Classes/Domain/Import/Entity/Place.php index b039a24..208e10a 100644 --- a/Classes/Domain/Import/Entity/Place.php +++ b/Classes/Domain/Import/Entity/Place.php @@ -51,7 +51,7 @@ class Place extends Base /** * @var OpeningHour[] */ - protected $openingHours = []; + protected $openingHoursSpecifications = []; /** * @var OpeningHour[] @@ -160,7 +160,7 @@ class Place extends Base { return GeneralUtility::makeInstance(DateBasedFilter::class) ->filterOutPreviousDates( - $this->openingHours, + $this->openingHoursSpecifications, function (OpeningHour $hour): ?\DateTimeImmutable { return $hour->getValidThrough(); } @@ -210,7 +210,7 @@ class Place extends Base */ public function addOpeningHoursSpecification(OpeningHour $openingHour): void { - $this->openingHours[] = $openingHour; + $this->openingHoursSpecifications[] = $openingHour; } /**