salamwaddah/laravel-relation-parser
Parse dot-notated Eloquent relationship strings into structured arrays for safe eager loading, validation, and API include parameters. Handles nested relations, making it easy to resolve and load only requested relationships in Laravel.
What shipped: v1.4.0 is a single-change compatibility release — one PR adding Laravel 13 support. No new features, no deprecations, no API changes announced. Treat it as a maintenance/packaging release, not a capability release.
Architecture fit: The package is a narrow, single-purpose utility that introspects Eloquent models and resolves their relation definitions. It is the kind of dependency that sits beside the domain rather than inside it — consumed by tooling (schema/ERD generation, API resource scaffolding, permission or dependency-graph builders, data-lineage and audit jobs) rather than by request-handling code. That is a good architectural profile for a TPM: small surface area, easy to isolate behind an internal adapter, and cheap to remove if it disappoints. It is not a candidate for core domain logic, because its output is derived from source-level model declarations and is therefore only as reliable as the conventions your team follows.
Integration feasibility: High. Composer-installable, no infrastructure, no service provider or config publishing implied by the release. The only meaningful integration work is (a) confirming the version constraint actually admits the Laravel versions we run, and (b) wrapping the parser so call sites do not depend on its return types directly.
Technical risk:
morphMap setups — are the likely failure surface. Silent misparse (returning a plausible but wrong relation) is a worse failure mode than a thrown exception, and nothing in this release addresses detection.Key questions for the maintainer / our own verification:
illuminate/* and php constraint in v1.4.0's composer.json, and what was it in v1.3.0? Did anything get dropped?Stack fit: Any Laravel application on a supported PHP version. Zero runtime footprint if scoped as a require-dev dependency for tooling and CI jobs — which is the recommended default. Promote to require only if a production code path (e.g. an admin schema browser or a generated-API layer) genuinely needs live introspection.
Migration path: There is no prior assessment and no existing integration, so this is a greenfield adoption rather than a migration. The realistic path: pin ^1.3 if the team is on an older Laravel and v1.4.0 narrows constraints; pin ^1.4 only once the constraint diff is confirmed and Laravel 13 is either GA or irrelevant to us. Because it is 1.x, pin minors explicitly (1.4.*) rather than floating, and let the lockfile be the contract.
Compatibility checks before merge:
composer.json between v1.3.0 and v1.4.0 to see whether the Laravel 13 addition came with a removal.Sequencing:
RelationIntrospector) so call sites never see the package's types. This is the single highest-leverage decision for exit cost.Maintenance: Low ongoing cost but non-zero ownership. Budget roughly one engineer-day per Laravel major upgrade to re-verify the parser against our model corpus, plus a few hours per minor bump to rerun the contract tests. We own the fork decision if the project stalls — for a package this small, a vendored fork is a realistic and cheap contingency.
Support: Community-only, no SLA, no vendor. Escalation is "open an issue" or "patch our fork." Acceptable for dev tooling; not acceptable for anything on a production critical path without the adapter in place.
Scaling: The parser's cost is proportional to the number of models and the complexity of their relation declarations — it is introspection, so it is I/O-and-reflection bound, not request-throughput bound. Never call it per-request. Compute once at build/deploy time or into a cache (file, Redis, config cache) and read from there. On applications with a few hundred models, expect a visible but manageable cold-start cost; the fix is caching, not optimisation.
Failure modes:
Ramp-up: Hours, not days, for a mid-level Laravel engineer — the API is small and the domain concept (Eloquent relations) is already familiar. The real ramp-up cost is not learning the package but learning our conventions for where parsing is allowed to be trusted and where it must be validated, which is what the adapter and the golden-file tests encode.
Verdict on this release: v1.4.0 is a low-risk, positive-signal maintenance release — it confirms the maintainer responds to new Laravel majors, which was the main long-term durability question for a single-maintainer package. It does not change the assessment materially beyond raising confidence in upkeep. Recommend adopting at 1.4.* as a dev-scoped dependency behind an adapter, contingent on confirming the constraint diff did not drop framework versions we still run.
How can I help you explore Laravel packages today?