From: Raphaƫl Gertz Date: Sat, 5 Dec 2026 03:23:30 +0000 (+0100) Subject: Replace deprecated datetime by datetime_immutable in period X-Git-Tag: 0.6.1~3 X-Git-Url: https://git.rapsys.eu/airbundle/commitdiff_plain/a995943e080b3dc898d51cce6852f2e1d0956b81?ds=sidebyside Replace deprecated datetime by datetime_immutable in period --- diff --git a/Controller/AbstractController.php b/Controller/AbstractController.php index 423d2fd..9f72c5f 100644 --- a/Controller/AbstractController.php +++ b/Controller/AbstractController.php @@ -122,12 +122,12 @@ abstract class AbstractController extends BaseAbstractController implements Serv //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