diff --git a/httpdocs/src/EventListener/AuthenticationSuccessListener.php b/httpdocs/src/EventListener/AuthenticationSuccessListener.php index e8d11ad..2d5dc09 100644 --- a/httpdocs/src/EventListener/AuthenticationSuccessListener.php +++ b/httpdocs/src/EventListener/AuthenticationSuccessListener.php @@ -38,7 +38,7 @@ class AuthenticationSuccessListener } $userApi = $this->microMapper->map($user, UserApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); $userIri = $this->iriConverter->getIriFromResource($userApi); diff --git a/httpdocs/src/Mapper/LocationEntityToApiMapper.php b/httpdocs/src/Mapper/LocationEntityToApiMapper.php index 4f3b74a..91a634e 100644 --- a/httpdocs/src/Mapper/LocationEntityToApiMapper.php +++ b/httpdocs/src/Mapper/LocationEntityToApiMapper.php @@ -45,7 +45,7 @@ class LocationEntityToApiMapper implements MapperInterface $dto->createdAt = $entity->getCreatedAt(); $dto->zoneIri = $dto->zone = $this->microMapper->map($entity->getZone(), ZoneApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); return $dto; diff --git a/httpdocs/src/Mapper/TripEntityToApiMapper.php b/httpdocs/src/Mapper/TripEntityToApiMapper.php index 6416b12..1025e30 100644 --- a/httpdocs/src/Mapper/TripEntityToApiMapper.php +++ b/httpdocs/src/Mapper/TripEntityToApiMapper.php @@ -47,15 +47,15 @@ class TripEntityToApiMapper implements MapperInterface // Map related entities $dto->vesselIri = $dto->vessel = $this->microMapper->map($entity->getVessel(), VesselApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); $dto->startLocationIri = $dto->startLocation = $this->microMapper->map($entity->getStartLocation(), LocationApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); $dto->endLocationIri = $dto->endLocation = $this->microMapper->map($entity->getEndLocation(), LocationApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); return $dto; diff --git a/httpdocs/src/Mapper/TripLocationEntityToApiMapper.php b/httpdocs/src/Mapper/TripLocationEntityToApiMapper.php index f2d7f59..ef6110d 100644 --- a/httpdocs/src/Mapper/TripLocationEntityToApiMapper.php +++ b/httpdocs/src/Mapper/TripLocationEntityToApiMapper.php @@ -42,11 +42,11 @@ class TripLocationEntityToApiMapper implements MapperInterface $dto->createdAt = $entity->getCreatedAt(); $dto->trip = $this->microMapper->map($entity->getTrip(), TripApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); $dto->location = $this->microMapper->map($entity->getLocation(), LocationApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); return $dto; diff --git a/httpdocs/src/Mapper/UserEntityToApiMapper.php b/httpdocs/src/Mapper/UserEntityToApiMapper.php index c74d6e8..1c34e2e 100644 --- a/httpdocs/src/Mapper/UserEntityToApiMapper.php +++ b/httpdocs/src/Mapper/UserEntityToApiMapper.php @@ -50,7 +50,7 @@ class UserEntityToApiMapper implements MapperInterface $dto->imageIri = $dto->image = null; if ($entity->getImage() !== null) { $dto->imageIri = $dto->image = $this->microMapper->map($entity->getImage(), MediaObjectApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); } diff --git a/httpdocs/src/Mapper/UserTripEntityToApiMapper.php b/httpdocs/src/Mapper/UserTripEntityToApiMapper.php index 5314a16..2599f98 100644 --- a/httpdocs/src/Mapper/UserTripEntityToApiMapper.php +++ b/httpdocs/src/Mapper/UserTripEntityToApiMapper.php @@ -47,17 +47,17 @@ class UserTripEntityToApiMapper implements MapperInterface $dto->createdAt = $entity->getCreatedAt(); $dto->tripIri = $dto->trip = $this->microMapper->map($entity->getTrip(), TripApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); $dto->userIri = $dto->user = $this->microMapper->map($entity->getUser(), UserApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); $dto->signatureIri = $dto->signature = null; if ($entity->getSignature() !== null) { $dto->signatureIri = $dto->signature = $this->microMapper->map($entity->getSignature(), MediaObjectApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); } diff --git a/httpdocs/src/Mapper/UserTripEventApiToEntityMapper.php b/httpdocs/src/Mapper/UserTripEventApiToEntityMapper.php index f85aa28..f22c5d3 100644 --- a/httpdocs/src/Mapper/UserTripEventApiToEntityMapper.php +++ b/httpdocs/src/Mapper/UserTripEventApiToEntityMapper.php @@ -41,21 +41,21 @@ class UserTripEventApiToEntityMapper implements MapperInterface } $userTrip = $this->microMapper->map($dto->userTripIri, UserTrip::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); if (!$userTrip) { throw new \Exception('UserTrip not found'); } $event = $this->microMapper->map($dto->eventIri, Event::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); if (!$event) { throw new \Exception('Event not found'); } $location = $this->microMapper->map($dto->locationIri, Location::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); if (!$location) { throw new \Exception('Location not found'); @@ -72,7 +72,7 @@ class UserTripEventApiToEntityMapper implements MapperInterface assert($entity instanceof UserTripEvent); $userTrip = $this->microMapper->map($dto->userTripIri, UserTrip::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); if (!$userTrip) { throw new \Exception('UserTrip not found'); @@ -80,7 +80,7 @@ class UserTripEventApiToEntityMapper implements MapperInterface $entity->setUserTrip($userTrip); $event = $this->microMapper->map($dto->eventIri, Event::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); if (!$event) { throw new \Exception('Event not found'); @@ -88,7 +88,7 @@ class UserTripEventApiToEntityMapper implements MapperInterface $entity->setEvent($event); $location = $this->microMapper->map($dto->locationIri, Location::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); if (!$location) { throw new \Exception('Location not found'); diff --git a/httpdocs/src/Mapper/UserTripEventEntityToApiMapper.php b/httpdocs/src/Mapper/UserTripEventEntityToApiMapper.php index a48d61b..03b2f34 100644 --- a/httpdocs/src/Mapper/UserTripEventEntityToApiMapper.php +++ b/httpdocs/src/Mapper/UserTripEventEntityToApiMapper.php @@ -44,19 +44,19 @@ class UserTripEventEntityToApiMapper implements MapperInterface $dto->createdAt = $entity->getCreatedAt(); $dto->userTripIri = $dto->userTrip = $this->microMapper->map($entity->getUserTrip(), UserTripApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); $dto->eventIri = $dto->event = $this->microMapper->map($entity->getEvent(), EventApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); $dto->locationIri = $dto->location = $this->microMapper->map($entity->getLocation(), LocationApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); $dto->user = $this->microMapper->map($entity->getUserTrip()->getUser(), UserApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); return $dto; diff --git a/httpdocs/src/Mapper/UserTripLocationEntityToApiMapper.php b/httpdocs/src/Mapper/UserTripLocationEntityToApiMapper.php index f218cc0..750afaa 100644 --- a/httpdocs/src/Mapper/UserTripLocationEntityToApiMapper.php +++ b/httpdocs/src/Mapper/UserTripLocationEntityToApiMapper.php @@ -41,11 +41,11 @@ class UserTripLocationEntityToApiMapper implements MapperInterface $dto->createdAt = $entity->getCreatedAt(); $dto->userTrip = $this->microMapper->map($entity->getUserTrip(), UserTripApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); $dto->location = $this->microMapper->map($entity->getLocation(), LocationApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); return $dto; diff --git a/httpdocs/src/Mapper/UserTripWorkLogEntityToApiMapper.php b/httpdocs/src/Mapper/UserTripWorkLogEntityToApiMapper.php index 70432a7..e98821f 100644 --- a/httpdocs/src/Mapper/UserTripWorkLogEntityToApiMapper.php +++ b/httpdocs/src/Mapper/UserTripWorkLogEntityToApiMapper.php @@ -42,15 +42,15 @@ class UserTripWorkLogEntityToApiMapper implements MapperInterface $dto->createdAt = $entity->getCreatedAt(); $dto->userTrip = $this->microMapper->map($entity->getUserTrip(), UserTripApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); $dto->startLocation = $this->microMapper->map($entity->getStartLocation(), LocationApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); $dto->endLocation = $this->microMapper->map($entity->getEndLocation(), LocationApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); return $dto; diff --git a/httpdocs/src/Mapper/VesselEntityToApiMapper.php b/httpdocs/src/Mapper/VesselEntityToApiMapper.php index abae9c2..26be22c 100644 --- a/httpdocs/src/Mapper/VesselEntityToApiMapper.php +++ b/httpdocs/src/Mapper/VesselEntityToApiMapper.php @@ -41,7 +41,7 @@ class VesselEntityToApiMapper implements MapperInterface $dto->createdAt = $entity->getCreatedAt(); $dto->company = $this->microMapper->map($entity->getCompany(), ShippingCompanyApi::class, [ - MicroMapperInterface::MAX_DEPTH => 1, + MicroMapperInterface::MAX_DEPTH => 3, ]); return $dto;