gointegro/hateoas
Laravel package for building HATEOAS-compliant REST APIs. It adds hypermedia links and embedded relationships to Eloquent resources, supports HAL and JSON:API formats, and helps you ship self-descriptive, discoverable APIs with minimal boilerplate.
Architecture fit. gointegro/hateoas is a Laravel-shaped package: a service provider, resource transformers, and a serializer that wraps existing Eloquent-backed REST responses into a JSON:API-style hypermedia envelope (links, embedded relationships, sparse fieldsets, pagination). Architecturally it sits between controllers and models, so it competes directly with Laravel API Resources and league/fractal. It assumes a conventional Laravel request lifecycle and route model binding; it is a poor fit for event-sourced, gRPC-first, or non-Laravel services.
Integration feasibility. The package's last release was June 2015, which pins it to the Laravel 4.x/5.x and PHP 5.x era. A modern install (Laravel 10/11, PHP 8.2+) is not viable without a fork: expect composer constraint edits, PHP 8 syntax fixes, container/contract updates, and re-validation against current JSON:API semantics. Treat adoption as a vendoring exercise, not a composer require.
Technical risk. High and structural: unmaintained for ~a decade, no security advisories, no CI signal on current PHP, and dependency drift (Symfony components, illuminate/*) that will block framework upgrades. Secondary risks are behavioral — serializer assumptions baked into the 2015 JSON:API draft, and undocumented edge cases around nested includes.
Key questions.
Stack fit. Best suited to brownfield Laravel 4.x/5.x or Lumen APIs that already expose resourceful controllers and want hypermedia with minimal contract churn. For greenfield Laravel 10/11, the fit is poor — native API Resources plus a maintained JSON:API library delivers the same envelope without the fork burden.
Migration path. Two realistic routes. (1) Adopt-and-fork: vendor the source, pin it internally, modernize PHP/framework constraints, and treat it as an internal package. (2) Reference blueprint: mine the package's transformer/link conventions as a design spec, then reimplement on Laravel API Resources or laravel-json-api. Route 1 preserves behavior for existing consumers; Route 2 is cheaper long-term.
Compatibility. Verify against Eloquent eager loading, route model binding, paginator contracts, and content negotiation (Accept: application/vnd.api+json). If the API sits behind Dingo or an API gateway, confirm middleware ordering — link generation depends on named routes resolving correctly.
Sequencing.
Maintenance. This becomes an owned asset. Budget 0.25–0.5 FTE for the first two quarters (PHP 8 modernization, dependency pins, CI on the target framework), tapering to steady-state patch duty. Add it to the internal package registry with an explicit owner and upgrade SLA.
Support. No upstream maintainer, no CVE feed, no commercial backing. Support is entirely internal: an on-call runbook, a documented fork policy, and a deprecation plan if the framework moves again. The MIT license is permissive, so forking is legally clean.
Scaling. Serialization adds CPU per request; hypermedia envelopes typically inflate payloads 20–40%. The real scaling risk is included-relationship explosion — enforce a maximum include depth and sparse-fieldset allowlist, and cache generated link sets where routes are stable. Watch for N+1 queries driven by embedded resources.
Failure modes.
self links.Ramp-up. For a team fluent in REST but new to hypermedia/JSON:API, expect 1–2 sprints to productive contribution: one sprint on the spec and package internals, one on the fork's build/test pipeline. Documentation is thin, so plan for internal docs to be written during the spike — treat them as a deliverable, not an afterthought.
How can I help you explore Laravel packages today?