scolib/l5-repository
A Laravel package for the repository pattern, adding criteria, presenters, validators, and cache support to keep your application's data layer clean, testable, and framework-agnostic.
Release read (v3.0.0): two changes, one convenience feature and one breaking platform constraint.
findOrNew — small ergonomic win, unclear differentiation. The value depends entirely on what findOrNew does that Eloquent's firstOrNew / findOrNew does not. If this package wraps a repository or multi-model abstraction, this reduces boilerplate in "fetch-or-instantiate" flows. If it is a thin pass-through to Eloquent, it is a low-differentiation feature and should not drive adoption on its own.findOrNew set the primary key on the new instance, as Eloquent's findOrNew does? Divergent semantics between a same-named method and framework behavior is a defect class that surfaces in production writes, not in tests. Require docs and test coverage as an acceptance criterion.Recommended PM stance: do not adopt for greenfield work; evaluate only for existing legacy Laravel 5.5+ surfaces where the package is already a dependency or where a repository abstraction genuinely exists.
Adopt when all of the following hold:
findOrNew is one more consistent helper rather than a stray dependency.findOrNew semantics, and a stated support matrix covering the Laravel versions you actually run.Look elsewhere — or build the ~20 lines yourself — when:
firstOrNew / findOrNew.findOrNew semantics are undocumented or diverge from Eloquent. Ambiguity in persistence helpers is not worth the convenience.To executives (one paragraph): This release is a maintenance signal, not a product opportunity. Version 3.0.0 adds one convenience method and raises the minimum framework to Laravel 5.5 — which itself is past end-of-life. For our modern services it is not applicable; for any legacy surface still on 5.2–5.4 it is a breaking change we must schedule rather than absorb. Recommendation: no new investment, no new adoption, and a one-line answer to "are we affected?" from engineering.
To engineering leads (decision summary): v3.0.0 is a semver-major bump driven by the dropped laravel/framework constraint; the only functional addition is findOrNew. Before we take it anywhere: (1) confirm the exact supported range and whether 5.5/5.6 are still tested; (2) confirm findOrNew matches Eloquent's findOrNew semantics, including primary-key assignment on the new instance; (3) audit composer.json across the fleet for anything pinned below 5.5 that would now fail resolution. My prior recommendation, absent contrary evidence: don't adopt for greenfield, don't rush the bump on legacy — schedule it with the next framework upgrade, and if the package is only providing findOrNew, replace it with a local trait and drop the dependency.
Caveat on this assessment: it is derived from the v3.0.0 release notes alone. No repository data, download metrics, issue activity, or test coverage was available. Revisit the build-vs-buy call once the package's maintenance activity and full support matrix are confirmed.
How can I help you explore Laravel packages today?