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

Laravel Repositories Laravel Package

matthewbdaly/laravel-repositories

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit The package is deliberately minimal: an abstract base repository, a matching interface, and a caching decorator that wraps repository calls in Cache::remember-style logic. It is not an opinionated architecture — it is boilerplate reduction for teams that have already decided to adopt the repository pattern over Eloquent. That distinction matters for a TPM: the package does not de-risk the architectural decision, it only removes ~150 lines of typing after the decision is made. It has no service provider, no auto-binding, and no conventions for pagination, filtering, eager loading, or transaction boundaries, so every consuming team will diverge in how they extend it.

Integration feasibility Technically trivial and organisationally questionable. The entire value proposition is two or three classes; a mid-level engineer can reproduce them from the README in under a day. That means the realistic integration options are (a) add a composer dependency on an unmaintained package, or (b) vendor the MIT-licensed source with attribution. Option (b) carries near-zero risk and near-zero cost, which substantially undercuts the case for option (a).

Technical risk — HIGH

Factor Assessment
Last release 2018-06-08 — Laravel 5.6 era; predates Laravel 6 LTS through 11.x and PHP 8.x
Composer constraints Almost certainly pins illuminate/* to ^5.x; will fail resolution on modern Laravel without a fork
PHP 8 compatibility Unverified; small surface area but no CI signal to confirm. Expect deprecation noise at minimum
Maintainer bus factor 1, with 12 stars and no activity in ~7 years — treat as abandoned
Test coverage Not evident; you inherit no safety net
Security posture No upstream patches will ever ship; you own any advisory response

Key questions to answer before committing

  1. What exactly does composer.json constrain (php, illuminate/support, illuminate/database), and does it resolve against our target Laravel version?
  2. Does the caching decorator implement invalidation on write (create/update/delete), or is it read-only caching with manual flush?
  3. Does it support cache tags, configurable TTL, or per-method bypass? Without these, the decorator is a stale-data generator.
  4. Is the interface granular enough to hide Eloquent, or does it leak Model/Builder types and defeat the abstraction?
  5. Is the source small enough to fork and own (<500 LOC)? If yes, the dependency is indefensible.

Integration Approach

Stack fit Clean fit for a Laravel 5.x codebase already using the repository pattern. Poor fit for Laravel 9+ / PHP 8.1+, where composer resolution will likely fail out of the box and a fork is mandatory regardless — at which point you are maintaining a fork of an abandoned package, which is strictly worse than maintaining your own code.

Migration path Recommended: treat this as a reference implementation, not a dependency.

  1. Read the source in full (it is small).
  2. Copy the base class, interface, and decorator into app/Repositories/ with attribution retained per MIT.
  3. Rewrite signatures to your PHP/Laravel baseline and add strict types.
  4. Wrap behind your own namespace so consumers never reference the upstream package.

If a dependency is mandated, use a Composer VCS/path repository pointing at an internal fork with widened constraints — never the public Packagist tag.

Compatibility Confirm three things in order: PHP constraint, illuminate/* constraint, and whether the decorator uses the Illuminate\Contracts\Cache\Repository contract (portable) versus the Cache facade (testability problem). Also check cache key construction for collisions across repositories — a common flaw in decorators of this vintage.

Sequencing

  1. Week 1 — Source review and go/no-go; produce a one-page compatibility verdict.
  2. Week 1 — Decide vendor vs. fork vs. internal reimplementation; default to reimplementation.
  3. Week 2 — PoC on a single low-risk aggregate behind a feature flag; write the tests the package does not ship.
  4. Week 3 — Codify conventions (key naming, TTL, invalidation contract) as a team ADR; only then allow broader adoption.
  5. Ongoing — Ban direct Eloquent access in adopting modules, or the abstraction will erode.

Operational Impact

Maintenance Effectively zero upstream maintenance, and that is the core issue: the cost does not disappear, it transfers to your team. Budget a named owner for the vendored code and a defined review cadence tied to Laravel major upgrades. The package will not break loudly — it will break at the worst moment, during a framework upgrade, when the constraint conflict blocks the whole application.

Support No commercial support, no active maintainer, negligible community (12 stars means Stack Overflow answers are effectively nonexistent). Support burden lands entirely on internal engineers reading source. Institutional knowledge concentrates in whoever performed the initial review — a real bus-factor risk for a "small" dependency.

Scaling Two scaling hazards are structural, not incidental:

  • Cache correctness at scale. A decorator that caches reads without rigorous write-through invalidation produces stale reads that surface only under concurrency, and cache stampedes on hot keys unless locking/stale-while-revalidate is added. Neither is likely present in a 2018 package.
  • Query amplification. A generic all() on a base repository invites full-table loads and hides N+1 patterns behind a method call, which reviewers cannot see in the calling code. This is the classic failure mode of thin repository abstractions and it gets worse as data volume grows.

Failure modes to plan for

  1. Silent staleness — decorator caches a read, write path bypasses invalidation; users see old data with no error signal.
  2. Framework upgrade block — composer constraint conflict halts a Laravel major upgrade across every dependent service.
  3. Abstraction erosion — developers bypass the repository for complex queries, leaving two data-access idioms in one codebase.
  4. Cache-store outage — verify behaviour degrades to database reads rather than hard-failing requests.
  5. PHP 8 runtime errors — untyped or loosely-typed signatures failing under stricter runtime semantics.

Ramp-up Low for engineers: the surface area is tiny and the pattern is well understood — a day to productivity. That is precisely the problem. The ramp-up cost is near-zero because the package contributes near-zero, which is why the 0.09 score is a fair verdict. The decision to adopt repositories is the expensive, high-judgment call; this package is a footnote to it. Recommendation: consume as a design reference, vendor the source, own the code, and do not add it as a runtime dependency.

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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle