//Set period
$this->period = new \DatePeriod(
//Start from first monday of week
- new \DateTime('Monday this week'),
+ new \DateTimeImmutable('Monday this week'),
//Iterate on each day
new \DateInterval('P1D'),
//End with next sunday and 4 weeks
//XXX: we can't use isGranted here as AuthenticatedVoter deny access because user is likely not authenticated yet :'(
- new \DateTime('Monday this week + 2 week')
+ new \DateTimeImmutable('Monday this week + 2 week')
);
//Get main request