Revert "Merge branch 'signature-app/wp-576-restorestored-object-version' into 'master'"

This reverts merge request !586
This commit is contained in:
2024-09-19 13:26:12 +00:00
parent 671bb6d593
commit e4d0705e84
1701 changed files with 14541 additions and 35017 deletions

View File

@@ -24,7 +24,9 @@ use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
class AddressConverter
{
public function __construct(private readonly AddressRender $addressRender, private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
public function __construct(private readonly AddressRender $addressRender, private readonly TranslatableStringHelperInterface $translatableStringHelper)
{
}
public function addressToRemote(Address $address): array
{

View File

@@ -28,7 +28,9 @@ use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
*/
class EventsOnUserSubscriptionCreator
{
public function __construct(private readonly LoggerInterface $logger, private readonly MachineHttpClient $machineHttpClient, private readonly MapCalendarToUser $mapCalendarToUser, private readonly UrlGeneratorInterface $urlGenerator) {}
public function __construct(private readonly LoggerInterface $logger, private readonly MachineHttpClient $machineHttpClient, private readonly MapCalendarToUser $mapCalendarToUser, private readonly UrlGeneratorInterface $urlGenerator)
{
}
/**
* @return array{secret: string, id: string, expiration: int}

View File

@@ -22,7 +22,9 @@ use Chill\MainBundle\Entity\Location;
class LocationConverter
{
public function __construct(private readonly AddressConverter $addressConverter) {}
public function __construct(private readonly AddressConverter $addressConverter)
{
}
public function locationToRemote(Location $location): array
{

View File

@@ -27,7 +27,8 @@ final readonly class MSUserAbsenceReader implements MSUserAbsenceReaderInterface
private HttpClientInterface $machineHttpClient,
private MapCalendarToUser $mapCalendarToUser,
private ClockInterface $clock,
) {}
) {
}
/**
* @throw UserAbsenceSyncException when the data cannot be reached or is not valid from microsoft

View File

@@ -21,7 +21,8 @@ readonly class MSUserAbsenceSync
private MSUserAbsenceReaderInterface $absenceReader,
private ClockInterface $clock,
private LoggerInterface $logger,
) {}
) {
}
public function syncUserAbsence(User $user): void
{

View File

@@ -29,7 +29,9 @@ class MachineTokenStorage
private ?AccessTokenInterface $accessToken = null;
public function __construct(private readonly Azure $azure, private readonly ChillRedis $chillRedis) {}
public function __construct(private readonly Azure $azure, private readonly ChillRedis $chillRedis)
{
}
public function getToken(): AccessTokenInterface
{

View File

@@ -36,7 +36,9 @@ class MapCalendarToUser
final public const SECRET_SUBSCRIPTION_EVENT = 'subscription_events_secret';
public function __construct(private readonly HttpClientInterface $machineHttpClient, private readonly LoggerInterface $logger) {}
public function __construct(private readonly HttpClientInterface $machineHttpClient, private readonly LoggerInterface $logger)
{
}
public function getActiveSubscriptionId(User $user): string
{

View File

@@ -29,7 +29,9 @@ class OnBehalfOfUserTokenStorage
{
final public const MS_GRAPH_ACCESS_TOKEN = 'msgraph_access_token';
public function __construct(private readonly Azure $azure, private readonly SessionInterface $session) {}
public function __construct(private readonly Azure $azure, private readonly SessionInterface $session)
{
}
public function getToken(): AccessToken
{

View File

@@ -32,7 +32,9 @@ class CalendarRangeSyncer
/**
* @param MachineHttpClient $machineHttpClient
*/
public function __construct(private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger, private readonly HttpClientInterface $machineHttpClient) {}
public function __construct(private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger, private readonly HttpClientInterface $machineHttpClient)
{
}
public function handleCalendarRangeSync(CalendarRange $calendarRange, array $notification, User $user): void
{

View File

@@ -29,7 +29,9 @@ use Symfony\Contracts\HttpClient\HttpClientInterface;
class CalendarSyncer
{
public function __construct(private readonly LoggerInterface $logger, private readonly HttpClientInterface $machineHttpClient, private readonly UserRepositoryInterface $userRepository) {}
public function __construct(private readonly LoggerInterface $logger, private readonly HttpClientInterface $machineHttpClient, private readonly UserRepositoryInterface $userRepository)
{
}
public function handleCalendarSync(Calendar $calendar, array $notification, User $user): void
{

View File

@@ -41,7 +41,9 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
{
private array $cacheScheduleTimeForUser = [];
public function __construct(private readonly CalendarRepository $calendarRepository, private readonly CalendarRangeRepository $calendarRangeRepository, private readonly HttpClientInterface $machineHttpClient, private readonly MapCalendarToUser $mapCalendarToUser, private readonly LoggerInterface $logger, private readonly OnBehalfOfUserTokenStorage $tokenStorage, private readonly OnBehalfOfUserHttpClient $userHttpClient, private readonly RemoteEventConverter $remoteEventConverter, private readonly TranslatorInterface $translator, private readonly UrlGeneratorInterface $urlGenerator, private readonly Security $security) {}
public function __construct(private readonly CalendarRepository $calendarRepository, private readonly CalendarRangeRepository $calendarRangeRepository, private readonly HttpClientInterface $machineHttpClient, private readonly MapCalendarToUser $mapCalendarToUser, private readonly LoggerInterface $logger, private readonly OnBehalfOfUserTokenStorage $tokenStorage, private readonly OnBehalfOfUserHttpClient $userHttpClient, private readonly RemoteEventConverter $remoteEventConverter, private readonly TranslatorInterface $translator, private readonly UrlGeneratorInterface $urlGenerator, private readonly Security $security)
{
}
public function countEventsForUser(User $user, \DateTimeImmutable $startDate, \DateTimeImmutable $endDate): int
{

View File

@@ -46,13 +46,23 @@ class NullRemoteCalendarConnector implements RemoteCalendarConnectorInterface
return [];
}
public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, ?CalendarRange $associatedCalendarRange = null): void {}
public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, ?CalendarRange $associatedCalendarRange = null): void
{
}
public function removeCalendarRange(string $remoteId, array $remoteAttributes, User $user): void {}
public function removeCalendarRange(string $remoteId, array $remoteAttributes, User $user): void
{
}
public function syncCalendar(Calendar $calendar, string $action, ?CalendarRange $previousCalendarRange, ?User $previousMainUser, ?array $oldInvites, ?array $newInvites): void {}
public function syncCalendar(Calendar $calendar, string $action, ?CalendarRange $previousCalendarRange, ?User $previousMainUser, ?array $oldInvites, ?array $newInvites): void
{
}
public function syncCalendarRange(CalendarRange $calendarRange): void {}
public function syncCalendarRange(CalendarRange $calendarRange): void
{
}
public function syncInvite(Invite $invite): void {}
public function syncInvite(Invite $invite): void
{
}
}

View File

@@ -23,16 +23,27 @@ use Symfony\Component\Serializer\Annotation as Serializer;
class RemoteEvent
{
public function __construct(
#[Serializer\Groups(['read'])]
/**
* @Serializer\Groups({"read"})
*/
public string $id,
#[Serializer\Groups(['read'])]
/**
* @Serializer\Groups({"read"})
*/
public string $title,
public string $description,
#[Serializer\Groups(['read'])]
/**
* @Serializer\Groups({"read"})
*/
public \DateTimeImmutable $startDate,
#[Serializer\Groups(['read'])]
/**
* @Serializer\Groups({"read"})
*/
public \DateTimeImmutable $endDate,
#[Serializer\Groups(['read'])]
/**
* @Serializer\Groups({"read"})
*/
public bool $isAllDay = false,
) {}
) {
}
}