pandawa/reloquent
Reloquent extends Laravel's Eloquent with relationship-aware query helpers, making it easier to filter, sort and eager-load related models through a fluent, chainable API. A lightweight addition for cleaner, more expressive relational queries.
Architecture fit. The package exposes an entity/repository abstraction over Laravel's data layer, with v0.1.9 adding a cache-backed entity path and PHPStorm generic annotations for Collection and Repository. This fits a conventional Laravel service/repository architecture where domain entities are hydrated through repositories. The addition of caching at the entity layer is a meaningful architectural signal: the package is positioning itself as a read-through caching boundary rather than a thin query wrapper. Teams already using repository patterns will find the mental model familiar; teams using Eloquent models directly will incur an abstraction tax.
Integration feasibility. Integration is low-friction in the mechanics — Composer install, service provider registration, config publish — and the generics work is purely developer-experience surface with zero runtime footprint, so it carries no integration risk. The cache entity feature is the only substantive integration decision, because it introduces a second source of truth and therefore an invalidation contract that the host application must respect. Feasibility is high; the cost sits in the invalidation discipline, not in the wiring.
Technical risk. The dominant risk is maturity, not capability. At v0.1.9 the package is pre-1.0, which under semver means minor and patch releases may carry breaking changes; adopting now means accepting upgrade churn with no compatibility guarantee. Secondary risks: (1) cache coherency — the release notes give no detail on TTL strategy, tag support, or write-through versus read-through behavior, so the invalidation model is currently unknown; (2) cache driver coupling — behavior under array, file, redis, and database drivers is unverified; (3) static analysis drift — the new generics may or may not satisfy PHPStan/Psalm at high levels, and IDE-only annotations can mask real type errors. None of these are disqualifying, but each needs a spike before commitment.
Key questions.
@template annotations that PHPStan/Psalm also honor, or IDE-only docblocks?Stack fit. Targets modern Laravel on PHP 8.x with Composer. The cache entity feature binds the package to Laravel's cache contract, which is an advantage — it inherits whatever driver the application already configures, including Redis and cluster modes, rather than introducing a bespoke cache client. The generics additions assume a JetBrains IDE but are inert elsewhere, so mixed-IDE teams are unaffected.
Migration path. No prior assessment exists, so this is a greenfield adoption rather than a migration. Recommended path: pilot in a single bounded context (one entity family, one repository) behind a feature flag, with the cache layer initially disabled. Enable the entity cache only after the invalidation contract is documented internally. Do not retrofit the abstraction across existing Eloquent-heavy code in the first pass; coexistence is the cheaper path.
Compatibility. Two compatibility axes need verification: the Laravel version and PHP version constraints declared in composer.json, and cache driver compatibility for the new entity cache. The generics feature should be validated against the project's PHPStan/Psalm baseline before adoption, since raising static analysis levels with new generic types can surface pre-existing violations in consuming code. Confirm the package does not pin transitive dependencies that conflict with the application's lockfile.
Sequencing.
composer.json; do not float to ^0.1 given pre-1.0 churn.Maintenance. Pre-1.0 status means upgrade work is a recurring line item, not a one-time cost. Budget for reading changelogs on every bump and pinning versions deliberately. The cache entity feature adds ongoing maintenance surface in the application itself: every new entity write path becomes a potential invalidation bug, and that burden lands on the application team regardless of package quality.
Support. Support depth is unknown from release notes alone. Before adoption, establish: maintainer responsiveness, whether issues are triaged, and whether the package is corporate-backed or single-maintainer. A single-maintainer pre-1.0 package is an acceptable bet for a bounded internal tool and a poor bet for a system with availability commitments. Absent a support contract, plan for the team to own the code path, including the option to fork.
Scaling. The cache entity feature is the scaling lever and the scaling hazard. Done well, it removes database load from hot read paths. Done poorly, it produces stale reads under concurrent writes and cache stampedes on key expiry. Specific concerns to validate under load: thundering-herd behavior on cold cache, memory footprint of cached entities at scale, and whether invalidation is synchronous (adding write latency) or queued (adding staleness window). The generics additions have no scaling implications whatsoever.
Failure modes.
database or file cache, where tag semantics differ or are unsupported.Each of these needs a named owner and a detection signal before the cache path goes to production.
Ramp-up. Engineer ramp-up is modest for anyone fluent in Laravel and the repository pattern — the concepts are conventional and the generics additions actively improve IDE discoverability, shortening the time to correct usage. The real ramp-up cost is institutional rather than individual: the team must internalize and document the invalidation contract so that every engineer writing an entity mutation knows the rule. Estimate one to two days for the pilot engineer to reach productive use, plus a short written standard before broader rollout. Onboarding material should be authored internally, since external documentation for a v0.1.x package will be thin.
How can I help you explore Laravel packages today?