iabduul7/laravel-themepark-booking-adapters
A Laravel package that provides adapter classes for integrating theme park booking systems. It offers a consistent interface for connecting booking providers and handling availability, reservations, and ticketing workflows in your application.
getProduct() for single-entity lookups, park-availability reads, and SmartOrder getExistingOrder() map directly onto PDP → availability → cart/checkout → order-status journeys. v4.0.0's dedicated productNotFound() / orderNotFound() exceptions let you plan explicit UX states ("this ticket is no longer sold", "we can't find that order") instead of generic error pages.ThemeParkApiException, with getCode() for status and getResponseData() for the decoded provider body. That is the difference between "we can't tell whether a booking failed or returned nothing" and being able to promise customers a truthful booking-confirmation state and a defensible incident postmortem.validateCredentials() now genuinely returns false on auth failure, and SmartOrder's token request and post-401 self-heal are status-checked. This unlocks a real ops story: proactive credential-expiry alerting per supplier, rather than discovering a dead token during a customer's checkout.getResponseData() mean supplier error bodies (e.g. sold-out, invalid date, rate-limited) can be classified, counted, and surfaced. That supports decisions like "which supplier fails most on peak dates", "should we add a fallback supplier", and "what does our refund/deposit exposure look like when a write fails mid-flow".OptionCodeResolver, and SeaWorld supplier coverage is a credible signal for treating this dependency as production-grade in a revenue path.Adopt when:
OptionCodeResolver are the reusable parts.Look elsewhere or defer when:
Migration criteria for v4.0.0 specifically: treat it as a project, not a patch. Inventory every call site that consumed arrays from failed reads; wrap or catch ThemeParkApiException at the boundary; wire productNotFound() / orderNotFound() into distinct UX paths; and add alerting on credential-validation failures now that the signal is trustworthy.
To executives (one paragraph): We evaluated the theme park booking adapter library, and its new v4.0.0 release materially changes the risk profile in our favour. Previously, if a supplier's API failed, the library returned an empty result — meaning a customer could see "no availability" or a blank confirmation when the truth was an outage or a bad credential. v4.0.0 makes every failure loud and typed, so we can tell the difference between "sold out", "not found", and "supplier is down", and we can show customers accurate states and refund exposure. Retry behaviour is unchanged and conservative: reads are retried, writes are never retried, so the library cannot double-book a customer. It covers Disney, SeaWorld, and SmartOrder with 52 tests across all adapters, which is credible for a revenue-path dependency. The cost is a one-time breaking-change migration and the residual risk of a single-maintainer open-source dependency — which we should mitigate with vendor-risk review and an internal fallback plan rather than by building three supplier integrations ourselves.
To engineering leadership: The adapter surface is stable (products, availability, orders) and the breaking change is confined to error handling: 4xx/5xx now raise ThemeParkApiException with getCode() and getResponseData(); single-entity 404s raise productNotFound() / orderNotFound(). We gain a genuinely correct validateCredentials() — which we can put behind a scheduled health check per supplier — plus status-checked SmartOrder token refresh and a properly retried, status-checked Disney availability read. Budget for: a call-site audit for any "empty array means nothing found" assumptions, a boundary layer that translates library exceptions into our domain errors, and reconciliation tooling for writes since the library intentionally never retries them. Recommend we adopt behind our integration boundary so a future major or a maintainer change is a single-adapter swap.
To the wider business (support, ops, finance): Expect fewer "phantom unavailable" incidents and faster, more honest answers to customers. Support will get a real error reason (and the supplier's own response body) instead of a blank page, and ops will get alerted when a supplier credential stops working rather than finding out at checkout. Finance benefit is indirect but real: writes are never retried, so duplicate bookings from retries should not occur from this layer, and failed writes are now unambiguous and auditable.
How can I help you explore Laravel packages today?