Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

L5 Repository Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

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.
  • Supported use cases to validate against: edit/create forms that prefill a model, PATCH-style API endpoints returning a blank resource when no record exists, import/sync jobs that need an unsaved shell, admin CRUD scaffolding, and settings/singleton-style records.
  • Dropping Laravel < 5.5 is a major-version breaking change. This is the decision-relevant item. It forces a support-matrix review across every product still on 5.2–5.4 before any shared dependency bump. Treat it as a fleet-wide upgrade task, not a routine patch.
  • Roadmap signal, not just a feature: the package now sets its floor at Laravel 5.5 — an LTS that reached end of security support in 2020. A v3.0.0 that adds 5.5 as the minimum, rather than modernizing to 9/10/11, suggests a maintenance posture lagging current Laravel. That is a build-vs-buy input: adopting it means owning upgrades later or forking.
  • Behavioral risk to confirm before committing: does 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.

When to Consider This Package

Adopt when all of the following hold:

  • The product runs Laravel 5.5 or later but is not yet on a modern major — i.e., you are maintaining, not starting.
  • You already have (or deliberately want) a repository/abstraction layer over models, so findOrNew is one more consistent helper rather than a stray dependency.
  • The "fetch or instantiate" pattern appears repeatedly in your codebase — form controllers, import jobs, API handlers — such that removing the boilerplate has measurable payoff.
  • The package has a real test suite, documented findOrNew semantics, and a stated support matrix covering the Laravel versions you actually run.
  • You can absorb the major-version bump in a planned upgrade window with a CI matrix covering your supported frameworks.

Look elsewhere — or build the ~20 lines yourself — when:

  • You are on Laravel 9/10/11. Version constraints and maintenance cadence here are a poor fit, and native Eloquent covers firstOrNew / findOrNew.
  • The package is a thin wrapper over Eloquent. Build-vs-buy clearly favors build: no vendor lock, no upgrade tax, no transitive constraint pressure.
  • You need guaranteed security patch response. A package whose minimum is an EOL framework is a supply-chain risk you must price in.
  • findOrNew semantics are undocumented or diverge from Eloquent. Ambiguity in persistence helpers is not worth the convenience.
  • You are mid-freeze or in a compliance window where adding a dependency requires an audit you have not budgeted.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route