pickupLoader->patchPickupsDetails($travel); $this->hotelLoader->patchHotelDetails($travel); return true; } catch (\Exception $e) { $this->logger->warning('Failed to enrich travel data', [ 'travelId' => $travel->id, 'error' => $e->getMessage(), ]); return false; } } /** * Replace travel insurances with fresh data from the XML insurance loader. * * Always overwrites any existing insurances — including stale snapshot data — so * callers receive fully-hydrated Insurance objects with resolved containedInsurances * as populated by InsuranceParser at parse time. * * @param Travel $travel The travel object whose insurances will be replaced */ public function patchInsurances(Travel $travel): void { try { $travel->insurances = $this->insuranceLoader->loadAll(); } catch (\Exception $e) { $this->logger->warning('Failed to load insurance data', [ 'travelId' => $travel->id, 'error' => $e->getMessage(), ]); } } }