From 20b70f9eed4444722390bb448cd39caedf6836ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sun, 3 Jul 2022 21:31:57 +0200 Subject: [PATCH] fix typing and package deps to satisfy DI compilation --- composer.json | 1 + .../RemoteCalendar/Connector/MSGraph/MapCalendarToUser.php | 5 +++-- .../Connector/MSGraphRemoteCalendarConnector.php | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 4814e80ff..45d7ca832 100644 --- a/composer.json +++ b/composer.json @@ -24,6 +24,7 @@ "nyholm/psr7": "^1.4", "ocramius/package-versions": "^1.10 || ^2", "odolbeau/phone-number-bundle": "^3.6", + "ovh/ovh": "^3.0", "phpoffice/phpspreadsheet": "^1.16", "ramsey/uuid-doctrine": "^1.7", "sensio/framework-extra-bundle": "^5.5", diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MapCalendarToUser.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MapCalendarToUser.php index f1d7e883f..158982fdd 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MapCalendarToUser.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MapCalendarToUser.php @@ -15,6 +15,7 @@ use Chill\MainBundle\Entity\User; use DateTimeImmutable; use LogicException; use Psr\Log\LoggerInterface; +use Symfony\Contracts\HttpClient\HttpClientInterface; use function array_key_exists; /** @@ -32,10 +33,10 @@ class MapCalendarToUser private LoggerInterface $logger; - private MachineHttpClient $machineHttpClient; + private HttpClientInterface $machineHttpClient; public function __construct( - MachineHttpClient $machineHttpClient, + HttpClientInterface $machineHttpClient, LoggerInterface $logger ) { $this->machineHttpClient = $machineHttpClient; diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraphRemoteCalendarConnector.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraphRemoteCalendarConnector.php index 09bf4b129..0488892ec 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraphRemoteCalendarConnector.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraphRemoteCalendarConnector.php @@ -29,6 +29,7 @@ use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; +use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\Translation\TranslatorInterface; use function array_key_exists; use function count; @@ -43,7 +44,7 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface private LoggerInterface $logger; - private MachineHttpClient $machineHttpClient; + private HttpClientInterface $machineHttpClient; private MapCalendarToUser $mapCalendarToUser; @@ -60,7 +61,7 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface public function __construct( CalendarRepository $calendarRepository, CalendarRangeRepository $calendarRangeRepository, - MachineHttpClient $machineHttpClient, + HttpClientInterface $machineHttpClient, MapCalendarToUser $mapCalendarToUser, LoggerInterface $logger, OnBehalfOfUserTokenStorage $tokenStorage,