diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php
index 8d1cc7ba0..2278a62de 100644
--- a/.php-cs-fixer.php
+++ b/.php-cs-fixer.php
@@ -34,6 +34,7 @@
'minimum_number_of_parameters' => 2,
],
'type_declaration_spaces' => true,
+ 'nullable_type_declaration_for_default_null_value' => true,
])
->setFinder($finder)
->setCacheFile(__DIR__.'/var/.php-cs-fixer.cache')
diff --git a/app/config/routing_dev.yml b/app/config/routing_dev.yml
index 72a14c650..5dc13700c 100644
--- a/app/config/routing_dev.yml
+++ b/app/config/routing_dev.yml
@@ -1,14 +1,14 @@
_wdt:
- resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
- prefix: /_wdt
+ resource: "@WebProfilerBundle/Resources/config/routing/wdt.php"
+ prefix: /_wdt
_profiler:
- resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
- prefix: /_profiler
+ resource: "@WebProfilerBundle/Resources/config/routing/profiler.php"
+ prefix: /_profiler
_errors:
- resource: "@FrameworkBundle/Resources/config/routing/errors.xml"
- prefix: /_error
+ resource: "@FrameworkBundle/Resources/config/routing/errors.php"
+ prefix: /_error
_main:
- resource: routing.yml
+ resource: routing.yml
diff --git a/sources/Afup/Association/Cotisations.php b/sources/Afup/Association/Cotisations.php
index fa2dfa576..64f799c5c 100644
--- a/sources/Afup/Association/Cotisations.php
+++ b/sources/Afup/Association/Cotisations.php
@@ -632,7 +632,7 @@ public function finProchaineCotisation($cotisation = false): DateTime
* @param string|null $token Token de la facture. Si null, pas de vérification
* @return array
*/
- public function getByInvoice(string $invoiceId, string $token = null)
+ public function getByInvoice(string $invoiceId, ?string $token = null)
{
$requete = 'SELECT';
$requete .= ' * ';
diff --git a/sources/Afup/Corporate/Page.php b/sources/Afup/Corporate/Page.php
index 17e0c5a88..c294c5b5b 100644
--- a/sources/Afup/Corporate/Page.php
+++ b/sources/Afup/Corporate/Page.php
@@ -12,7 +12,7 @@
{
public function __construct(private FeuilleRepository $feuilleRepository) {}
- public function header($url = null, UserInterface $user = null): string
+ public function header($url = null, ?UserInterface $user = null): string
{
$url = urldecode((string) $url);
$str = '
';
diff --git a/sources/Afup/Forum/AppelConferencier.php b/sources/Afup/Forum/AppelConferencier.php
index faa0efee9..be1a1c3d4 100644
--- a/sources/Afup/Forum/AppelConferencier.php
+++ b/sources/Afup/Forum/AppelConferencier.php
@@ -233,8 +233,8 @@ public function modifierSession(
$blogPostUrl = null,
$interviewUrl = null,
$languageCode = null,
- int $skill = null,
- int $needs_mentoring = null,
+ ?int $skill = null,
+ ?int $needs_mentoring = null,
$use_markdown = null,
$video_has_fr_subtitles = null,
$video_has_en_subtitles = null,
diff --git a/sources/Afup/Utils/SymfonyKernel.php b/sources/Afup/Utils/SymfonyKernel.php
index 1f2d8aa19..6eb07cc86 100644
--- a/sources/Afup/Utils/SymfonyKernel.php
+++ b/sources/Afup/Utils/SymfonyKernel.php
@@ -15,7 +15,7 @@ class SymfonyKernel
protected ?Request $request;
protected ?Response $response = null;
- public function __construct(Request $request = null)
+ public function __construct(?Request $request = null)
{
$env = 'prod';
$debug = false;
diff --git a/sources/AppBundle/Association/Model/CompanyMember.php b/sources/AppBundle/Association/Model/CompanyMember.php
index d2da0eb70..abb3b90af 100644
--- a/sources/AppBundle/Association/Model/CompanyMember.php
+++ b/sources/AppBundle/Association/Model/CompanyMember.php
@@ -632,7 +632,7 @@ public function setLastSubscription(?string $sub): void
}
}
- public function hasUpToDateMembershipFee(\DateTimeInterface $now = null): bool
+ public function hasUpToDateMembershipFee(?\DateTimeInterface $now = null): bool
{
if (!$now instanceof \DateTimeInterface) {
$now = new \DateTime();
diff --git a/sources/AppBundle/Association/Model/GeneralMeetingQuestion.php b/sources/AppBundle/Association/Model/GeneralMeetingQuestion.php
index 143166966..0f346536b 100644
--- a/sources/AppBundle/Association/Model/GeneralMeetingQuestion.php
+++ b/sources/AppBundle/Association/Model/GeneralMeetingQuestion.php
@@ -100,7 +100,7 @@ public function getOpenedAt(): ?\DateTime
/**
* @return $this
*/
- public function setOpenedAt(\DateTime $openedAt = null): self
+ public function setOpenedAt(?\DateTime $openedAt = null): self
{
$this->propertyChanged('openedAt', $this->openedAt, $openedAt);
$this->openedAt = $openedAt;
@@ -119,7 +119,7 @@ public function getClosedAt(): ?\DateTime
/**
* @return $this
*/
- public function setClosedAt(\DateTime $closedAt = null): self
+ public function setClosedAt(?\DateTime $closedAt = null): self
{
$this->propertyChanged('closedAt', $this->closedAt, $closedAt);
$this->closedAt = $closedAt;
diff --git a/sources/AppBundle/Association/Model/Repository/TechletterSubscriptionsRepository.php b/sources/AppBundle/Association/Model/Repository/TechletterSubscriptionsRepository.php
index 52c9ef7b2..6fe40cfab 100644
--- a/sources/AppBundle/Association/Model/Repository/TechletterSubscriptionsRepository.php
+++ b/sources/AppBundle/Association/Model/Repository/TechletterSubscriptionsRepository.php
@@ -18,7 +18,7 @@
*/
class TechletterSubscriptionsRepository extends Repository implements MetadataInitializer
{
- public function subscribe(User $user = null): void
+ public function subscribe(?User $user = null): void
{
$subscription = new TechletterSubscription();
$subscription
@@ -28,7 +28,7 @@ public function subscribe(User $user = null): void
$this->save($subscription);
}
- public function hasUserSubscribed(User $user = null)
+ public function hasUserSubscribed(?User $user = null)
{
if (!$user instanceof User) {
return false;
diff --git a/sources/AppBundle/Association/Model/User.php b/sources/AppBundle/Association/Model/User.php
index 441c4c0f1..cb512e021 100644
--- a/sources/AppBundle/Association/Model/User.php
+++ b/sources/AppBundle/Association/Model/User.php
@@ -499,7 +499,7 @@ public function getReminderDate(): ?\DateTime
return $this->reminderDate;
}
- public function setReminderDate(\DateTime $reminderDate = null): self
+ public function setReminderDate(?\DateTime $reminderDate = null): self
{
$this->propertyChanged('reminderDate', $this->reminderDate, $reminderDate);
$this->reminderDate = $reminderDate;
@@ -553,7 +553,7 @@ public function setLastSubscription(?string $sub): void
}
}
- public function hasUpToDateMembershipFee(\DateTimeInterface $now = null): bool
+ public function hasUpToDateMembershipFee(?\DateTimeInterface $now = null): bool
{
if (!$now instanceof \DateTimeInterface) {
$now = new \DateTime();
@@ -561,7 +561,7 @@ public function hasUpToDateMembershipFee(\DateTimeInterface $now = null): bool
return $this->getLastSubscription() > $now;
}
- public function getDaysBeforeMembershipExpiration(\DateTimeInterface $now = null)
+ public function getDaysBeforeMembershipExpiration(?\DateTimeInterface $now = null)
{
if (!$now instanceof \DateTimeInterface) {
$now = new \DateTime();
@@ -670,7 +670,7 @@ public function hasRole($role): bool
return in_array($role, $roles);
}
- public function setRoles(array $roles = null): self
+ public function setRoles(?array $roles = null): self
{
if ($roles === null) {
$roles = [];
diff --git a/sources/AppBundle/Compta/BankAccount/BankAccountFactory.php b/sources/AppBundle/Compta/BankAccount/BankAccountFactory.php
index c463929a9..5c8562e1e 100644
--- a/sources/AppBundle/Compta/BankAccount/BankAccountFactory.php
+++ b/sources/AppBundle/Compta/BankAccount/BankAccountFactory.php
@@ -6,7 +6,7 @@
class BankAccountFactory
{
- public function createApplyableAt(\DateTimeInterface $applicationDate = null): BankAccount
+ public function createApplyableAt(?\DateTimeInterface $applicationDate = null): BankAccount
{
$comparisonDate = new \Datetime('2023-01-01');
$comparisonDate->setTime(0, 0, 1);
diff --git a/sources/AppBundle/Event/Model/Event.php b/sources/AppBundle/Event/Model/Event.php
index 000d9e885..c647b6650 100644
--- a/sources/AppBundle/Event/Model/Event.php
+++ b/sources/AppBundle/Event/Model/Event.php
@@ -261,14 +261,14 @@ public function getDateEndVote()
/**
* @return Event
*/
- public function setDateEndVote(DateTime $dateEndVote = null): self
+ public function setDateEndVote(?DateTime $dateEndVote = null): self
{
$this->propertyChanged('dateEndVote', $this->dateEndVote, $dateEndVote);
$this->dateEndVote = $dateEndVote;
return $this;
}
- public function isCfpOpen(DateTime $currentDate = null): bool
+ public function isCfpOpen(?DateTime $currentDate = null): bool
{
if (!$currentDate instanceof \DateTime) {
$currentDate = new DateTime();
@@ -278,7 +278,7 @@ public function isCfpOpen(DateTime $currentDate = null): bool
&& $currentDate >= $this->getDateStartCallForPapers();
}
- public function isVoteAvailable(DateTime $currentDate = null): bool
+ public function isVoteAvailable(?DateTime $currentDate = null): bool
{
if (!$currentDate instanceof \DateTime) {
$currentDate = new DateTime();
@@ -494,7 +494,7 @@ public function getDateEndSpeakersDinerInfosCollection(): ?\DateTime
/**
* @return $this
*/
- public function setDateEndSpeakersDinerInfosCollection(DateTime $dateEndSpeakersDinerInfosCollection = null): self
+ public function setDateEndSpeakersDinerInfosCollection(?DateTime $dateEndSpeakersDinerInfosCollection = null): self
{
$this->propertyChanged('dateEndSpeakersDinerInfosCollection', $this->dateEndSpeakersDinerInfosCollection, $dateEndSpeakersDinerInfosCollection);
$this->dateEndSpeakersDinerInfosCollection = $dateEndSpeakersDinerInfosCollection;
@@ -513,7 +513,7 @@ public function getDateEndHotelInfosCollection(): ?\DateTime
/**
* @return $this
*/
- public function setDateEndHotelInfosCollection(DateTime $dateEndHotelInfosCollection = null): self
+ public function setDateEndHotelInfosCollection(?DateTime $dateEndHotelInfosCollection = null): self
{
$this->propertyChanged('dateEndHotelInfosCollection', $this->dateEndHotelInfosCollection, $dateEndHotelInfosCollection);
$this->dateEndHotelInfosCollection = $dateEndHotelInfosCollection;
@@ -540,7 +540,7 @@ public function getDatePlanningAnnouncement(): ?\DateTime
*
* @return $this
*/
- public function setDatePlanningAnnouncement(DateTime $datePlanningAnnouncement = null): self
+ public function setDatePlanningAnnouncement(?DateTime $datePlanningAnnouncement = null): self
{
$this->propertyChanged('datePlanningAnnouncement', $this->datePlanningAnnouncement, $datePlanningAnnouncement);
$this->datePlanningAnnouncement = $datePlanningAnnouncement;
diff --git a/sources/AppBundle/Event/Model/Invoice.php b/sources/AppBundle/Event/Model/Invoice.php
index 37eccc085..bb84de5ec 100644
--- a/sources/AppBundle/Event/Model/Invoice.php
+++ b/sources/AppBundle/Event/Model/Invoice.php
@@ -140,7 +140,7 @@ public function getPaymentDate(): ?\DateTime
return $this->paymentDate;
}
- public function setPaymentDate(\DateTime $paymentDate = null): self
+ public function setPaymentDate(?\DateTime $paymentDate = null): self
{
$this->propertyChanged('paymentDate', $this->paymentDate, $paymentDate);
$this->paymentDate = $paymentDate;
@@ -155,7 +155,7 @@ public function getInvoiceDate(): ?\DateTime
return $this->invoiceDate;
}
- public function setInvoiceDate(\DateTime $invoiceDate = null): self
+ public function setInvoiceDate(?\DateTime $invoiceDate = null): self
{
$this->propertyChanged('invoiceDate', $this->invoiceDate, $invoiceDate);
$this->invoiceDate = $invoiceDate;
diff --git a/sources/AppBundle/Event/Model/Repository/EventStatsRepository.php b/sources/AppBundle/Event/Model/Repository/EventStatsRepository.php
index f9dc475fd..2e289a2f4 100644
--- a/sources/AppBundle/Event/Model/Repository/EventStatsRepository.php
+++ b/sources/AppBundle/Event/Model/Repository/EventStatsRepository.php
@@ -26,7 +26,7 @@ public function __construct(
private readonly TalkToSpeakersRepository $talkToSpeakersRepository,
) {}
- public function getStats(int $eventId, Datetime $from = null): EventStats
+ public function getStats(int $eventId, ?Datetime $from = null): EventStats
{
return new EventStats(
$this->getStatsForDay($eventId, self::DAY_ONE, $from),
diff --git a/sources/AppBundle/Event/Model/Repository/TalkRepository.php b/sources/AppBundle/Event/Model/Repository/TalkRepository.php
index 9130c7f94..6c05d32dd 100644
--- a/sources/AppBundle/Event/Model/Repository/TalkRepository.php
+++ b/sources/AppBundle/Event/Model/Repository/TalkRepository.php
@@ -31,12 +31,12 @@
*/
class TalkRepository extends Repository implements MetadataInitializer
{
- public function getNumberOfTalksByEvent(Event|int $event, \DateTime $since = null)
+ public function getNumberOfTalksByEvent(Event|int $event, ?\DateTime $since = null)
{
return $this->getNumberOfTalksByEventAndLanguage($event, null, $since);
}
- public function getNumberOfTalksByEventAndLanguage(Event|int $event, $languageCode = null, \DateTime $since = null)
+ public function getNumberOfTalksByEventAndLanguage(Event|int $event, $languageCode = null, ?\DateTime $since = null)
{
if ($event instanceof Event) {
$event = $event->getId();
diff --git a/sources/AppBundle/Event/Model/Repository/TalkToSpeakersRepository.php b/sources/AppBundle/Event/Model/Repository/TalkToSpeakersRepository.php
index 765cf351f..350195ec2 100644
--- a/sources/AppBundle/Event/Model/Repository/TalkToSpeakersRepository.php
+++ b/sources/AppBundle/Event/Model/Repository/TalkToSpeakersRepository.php
@@ -20,7 +20,7 @@
*/
class TalkToSpeakersRepository extends Repository implements MetadataInitializer
{
- public function getNumberOfSpeakers(Event|int $event, \DateTime $since = null)
+ public function getNumberOfSpeakers(Event|int $event, ?\DateTime $since = null)
{
if ($event instanceof Event) {
$event = $event->getId();
diff --git a/sources/AppBundle/Event/Model/Repository/TicketRepository.php b/sources/AppBundle/Event/Model/Repository/TicketRepository.php
index 9d5af7645..d0b6e1da0 100644
--- a/sources/AppBundle/Event/Model/Repository/TicketRepository.php
+++ b/sources/AppBundle/Event/Model/Repository/TicketRepository.php
@@ -124,7 +124,7 @@ public function getPublicSoldTicketsByDay($day, Event $event)
return $this->getPublicSoldTicketsByDayOfType($event, $day);
}
- public function getPublicSoldTicketsByDayOfType(Event $event, $day = null, TicketType $ticketType = null)
+ public function getPublicSoldTicketsByDayOfType(Event $event, $day = null, ?TicketType $ticketType = null)
{
$sql = '
SELECT COUNT(aif.id) AS sold_tickets
@@ -161,7 +161,7 @@ public function getPublicSoldTicketsByDayOfType(Event $event, $day = null, Ticke
return $tickets->first()['sold_tickets'];
}
- public function getPublicSoldTicketsOfType(Event $event, TicketType $ticketType = null)
+ public function getPublicSoldTicketsOfType(Event $event, ?TicketType $ticketType = null)
{
return $this->getPublicSoldTicketsByDayOfType($event, null, $ticketType);
}
diff --git a/sources/AppBundle/Event/Model/UserBadge.php b/sources/AppBundle/Event/Model/UserBadge.php
index cf9a46bc5..38b38dd56 100644
--- a/sources/AppBundle/Event/Model/UserBadge.php
+++ b/sources/AppBundle/Event/Model/UserBadge.php
@@ -68,7 +68,7 @@ public function getBadge(): ?Badge
return $this->badge;
}
- public function setBadge(Badge $badge = null): self
+ public function setBadge(?Badge $badge = null): self
{
$this->badge = $badge;
@@ -83,7 +83,7 @@ public function getIssuedAt(): ?\DateTime
/**
* @return $this
*/
- public function setIssuedAt(\DateTime $issuedAt = null): self
+ public function setIssuedAt(?\DateTime $issuedAt = null): self
{
$this->propertyChanged('issuedAt', $this->issuedAt, $issuedAt);
$this->issuedAt = $issuedAt;
diff --git a/sources/AppBundle/GeneralMeeting/GeneralMeetingRepository.php b/sources/AppBundle/GeneralMeeting/GeneralMeetingRepository.php
index c1cb80b1f..f738cb93d 100644
--- a/sources/AppBundle/GeneralMeeting/GeneralMeetingRepository.php
+++ b/sources/AppBundle/GeneralMeeting/GeneralMeetingRepository.php
@@ -45,7 +45,7 @@ public function getLatestGeneralAssemblyDate(): ?DateTimeImmutable
return null !== $maxDate ? new DateTimeImmutable('@' . $maxDate) : null;
}
- public function hasGeneralMeetingPlanned(DateTimeInterface $currentDate = null): bool
+ public function hasGeneralMeetingPlanned(?DateTimeInterface $currentDate = null): bool
{
if (!$currentDate instanceof \DateTimeInterface) {
$currentDate = new DateTime();
diff --git a/sources/AppBundle/Offices/NullOfficeFinder.php b/sources/AppBundle/Offices/NullOfficeFinder.php
index 0831a5e98..3a46a64a2 100644
--- a/sources/AppBundle/Offices/NullOfficeFinder.php
+++ b/sources/AppBundle/Offices/NullOfficeFinder.php
@@ -9,7 +9,7 @@
class NullOfficeFinder extends OfficeFinder
{
- public function findOffice(Invoice $invoice, User $user = null): ?string
+ public function findOffice(Invoice $invoice, ?User $user = null): ?string
{
return null;
}
diff --git a/sources/AppBundle/Offices/OfficeFinder.php b/sources/AppBundle/Offices/OfficeFinder.php
index 163f9f169..8c8b4d526 100644
--- a/sources/AppBundle/Offices/OfficeFinder.php
+++ b/sources/AppBundle/Offices/OfficeFinder.php
@@ -22,14 +22,14 @@ public function __construct(
private readonly AntenneRepository $antenneRepository,
) {}
- public function findOffice(Invoice $invoice, User $user = null): ?string
+ public function findOffice(Invoice $invoice, ?User $user = null): ?string
{
$infos = $this->findInfos($invoice, $user);
return $infos['office'] ?? null;
}
- protected function findInfos(Invoice $invoice, User $user = null): array
+ protected function findInfos(Invoice $invoice, ?User $user = null): array
{
$coordinates = $this->findCoordinates($invoice, $user);
@@ -54,7 +54,7 @@ protected function findInfos(Invoice $invoice, User $user = null): array
return $infos;
}
- protected function findCoordinates(Invoice $invoice, User $user = null): ?Coordinates
+ protected function findCoordinates(Invoice $invoice, ?User $user = null): ?Coordinates
{
if ($user instanceof User) {
if ($user->getCountry() !== 'FR') {
diff --git a/sources/AppBundle/Security/GithubAuthenticator.php b/sources/AppBundle/Security/GithubAuthenticator.php
index 573478eaf..a9b1eb0e6 100644
--- a/sources/AppBundle/Security/GithubAuthenticator.php
+++ b/sources/AppBundle/Security/GithubAuthenticator.php
@@ -77,7 +77,7 @@ public function onAuthenticationSuccess(Request $request, TokenInterface $token,
return new RedirectResponse($request->getSession()->get('_security.github_secured_area.target_path'));
}
- public function start(Request $request, AuthenticationException $authException = null): RedirectResponse
+ public function start(Request $request, ?AuthenticationException $authException = null): RedirectResponse
{
return new RedirectResponse($this->router->generate('connection_github'));
}
diff --git a/sources/AppBundle/Security/TestGithubAuthenticator.php b/sources/AppBundle/Security/TestGithubAuthenticator.php
index 460aeb8b0..03890d94c 100644
--- a/sources/AppBundle/Security/TestGithubAuthenticator.php
+++ b/sources/AppBundle/Security/TestGithubAuthenticator.php
@@ -80,7 +80,7 @@ public function onAuthenticationSuccess(Request $request, TokenInterface $token,
return new RedirectResponse($request->getSession()->get('_security.github_secured_area.target_path'));
}
- public function start(Request $request, AuthenticationException $authException = null): Response
+ public function start(Request $request, ?AuthenticationException $authException = null): Response
{
$body = "Oauth login test
";
foreach (array_keys($this->getTestUsersDetails()) as $name) {
diff --git a/sources/AppBundle/Slack/MessageFactory.php b/sources/AppBundle/Slack/MessageFactory.php
index 34cfc4443..eaa7512b5 100644
--- a/sources/AppBundle/Slack/MessageFactory.php
+++ b/sources/AppBundle/Slack/MessageFactory.php
@@ -178,7 +178,7 @@ public function createMessageForGeneralMeeting(GeneralMeetingRepository $general
return $message;
}
- public function createMessageForTicketStats(Event $event, EventStatsRepository $eventStatsRepository, TicketTypeRepository $ticketRepository, \DateTime $date = null): Message
+ public function createMessageForTicketStats(Event $event, EventStatsRepository $eventStatsRepository, TicketTypeRepository $ticketRepository, ?\DateTime $date = null): Message
{
$eventStats = $eventStatsRepository->getStats((int) $event->getId());
$message = new Message();
@@ -235,7 +235,7 @@ public function createMessageForTicketStats(Event $event, EventStatsRepository $
}
- public function createMessageForCfpStats(Event $event, TalkRepository $talkRepository, TalkToSpeakersRepository $talkToSpeakersRepository, \DateTime $currentDate, \DateTime $since = null): Message
+ public function createMessageForCfpStats(Event $event, TalkRepository $talkRepository, TalkToSpeakersRepository $talkToSpeakersRepository, \DateTime $currentDate, ?\DateTime $since = null): Message
{
$message = new Message();
$message
@@ -291,7 +291,7 @@ public function createMessageForCfpStats(Event $event, TalkRepository $talkRepos
/**
* @return Field[]
*/
- private function prepareCfpStatsFields(TalkRepository $talkRepository, TalkToSpeakersRepository $talkToSpeakersRepository, Event $event, \DateTime $since = null): array
+ private function prepareCfpStatsFields(TalkRepository $talkRepository, TalkToSpeakersRepository $talkToSpeakersRepository, Event $event, ?\DateTime $since = null): array
{
$infos = [
'Nombre de talks' => $talkRepository->getNumberOfTalksByEvent($event, $since)['talks'],
diff --git a/sources/AppBundle/TechLetter/Model/Sending.php b/sources/AppBundle/TechLetter/Model/Sending.php
index 6c6164b78..22cb80f25 100644
--- a/sources/AppBundle/TechLetter/Model/Sending.php
+++ b/sources/AppBundle/TechLetter/Model/Sending.php
@@ -59,7 +59,7 @@ public function getSendingDate(): ?\DateTime
return $this->sendingDate;
}
- public function setSendingDate(\DateTime $sendingDate = null): self
+ public function setSendingDate(?\DateTime $sendingDate = null): self
{
$this->propertyChanged('sendingDate', $this->sendingDate, $sendingDate);
$this->sendingDate = $sendingDate;
diff --git a/sources/AppBundle/Twig/ViewRenderer.php b/sources/AppBundle/Twig/ViewRenderer.php
index a81d31471..efae9099b 100644
--- a/sources/AppBundle/Twig/ViewRenderer.php
+++ b/sources/AppBundle/Twig/ViewRenderer.php
@@ -29,7 +29,7 @@ public function __construct(
*
* @return Response A Response instance
*/
- public function render(string $view, array $parameters = [], Response $response = null): Response
+ public function render(string $view, array $parameters = [], ?Response $response = null): Response
{
$blocks = [];
if ($this->requestStack->getCurrentRequest()) {