diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php index 8bb098861..78abb176f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php @@ -119,7 +119,7 @@ final readonly class SocialActionFilter implements FilterInterface public function normalizeFormData(array $formData): array { - return ['accepted_socialactions' => $formData['accepted_socialactions'], 'start_date_after' => $formData['start_date_after']->normalize(), 'start_date_before' => $formData['start_date_before']->normalize(), 'end_date_after' => $formData['end_date_after']->normalize(), 'end_date_before' => $formData['end_date_before']->normalize()]; + return ['accepted_socialactions' => $formData['accepted_socialactions'], 'start_date_after' => $formData['start_date_after']?->normalize(), 'start_date_before' => $formData['start_date_before']?->normalize(), 'end_date_after' => $formData['end_date_after']?->normalize(), 'end_date_before' => $formData['end_date_before']?->normalize()]; } public function denormalizeFormData(array $formData, int $fromVersion): array diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDatesTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDatesTest.php index 8415e2017..cb8bbecd4 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDatesTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDatesTest.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace src\Bundle\ChillPersonBundle\Tests\Export\Filter\AccompanyingCourseFilters; use Chill\MainBundle\Entity\User; +use Chill\MainBundle\Repository\UserRepositoryInterface; use Chill\MainBundle\Service\RollingDate\RollingDate; use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface; use Chill\MainBundle\Templating\Entity\UserRender; @@ -30,17 +31,20 @@ class ReferrerFilterBetweenDatesTest extends AbstractFilterTest private RollingDateConverterInterface $rollingDateConverter; private UserRender $userRender; + private UserRepositoryInterface $userRepository; + protected function setUp(): void { parent::setUp(); self::bootKernel(); $this->rollingDateConverter = self::getContainer()->get(RollingDateConverterInterface::class); $this->userRender = self::getContainer()->get(UserRender::class); + $this->userRepository = self::getContainer()->get(UserRepositoryInterface::class); } public function getFilter() { - return new ReferrerFilterBetweenDates($this->rollingDateConverter, $this->userRender); + return new ReferrerFilterBetweenDates($this->rollingDateConverter, $this->userRender, $this->userRepository); } public static function getFormData(): array