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

Repository Laravel Package

mtferreira/repository

A Laravel repository pattern package with base repositories, criteria, presenters, validators, and caching to keep data access clean and testable. Generate repositories and interfaces via Artisan and swap implementations without changing application code.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for the data-access layer. The package is an off-the-shelf implementation of the Active Repository pattern with a granular, config-driven cache. That makes it a legitimate "buy" candidate only as a fork you own — it lets you skip 2–4 weeks of designing a repository + cache abstraction and spend that time on differentiating features instead.
  • Whether caching becomes a product lever or an afterthought. The granular caching system is the interesting part: cache policy per repository/method means you can tune freshness vs. cost per domain (e.g., 60s for catalog reads, no cache for account balances) without rewriting query code. That supports roadmap items like "cut p95 API latency," "reduce DB spend," or "survive launch-day read spikes" without a re-architecture.
  • Data-source portability as a hedge. Abstracting Eloquent behind repositories is the insurance policy that makes later decisions cheap: adding a read replica, moving a hot table to a search index, or fronting a legacy service. If you're 6–18 months from a possible migration, this pattern buys optionality at low cost.
  • Legacy and multi-source integration work. For admin panels, reporting endpoints, or services that must read from both a modern DB and a legacy system, the repository contract is the seam. This is the highest-value use case for a PM: it turns "we need to touch the legacy system" from a scary one-off into a repeatable pattern.
  • Deprecation/support-cost decisions. Archived status, zero dependents, and a re-published fork namespace (mtferreira/repository mirroring rinvex/repository) are themselves a product signal. This assessment supports a "do not adopt as a live dependency; harvest as reference or vendor as an owned fork" decision, recorded as an ADR.
  • Risk register and upgrade-budget planning. If it's already in the codebase, this feeds the platform-risk backlog: Laravel major-version upgrades, PHP version bumps, and security patching all become your work. That's a recurring line item, not a one-time cost.

When to Consider This Package

Consider it when:

  • You already have it in a running Laravel app and the priority is stabilizing rather than modernizing — fork it, pin it, and treat it as internal code with an owner.
  • You have a team with genuine Laravel depth and spare capacity to own ~1–2k lines indefinitely (the MIT license makes forking clean; the archive status makes upstream help nonexistent).
  • You want a reference design for the repository + cache-tag pattern and intend to reimplement the 20% you need in-house rather than install the 100%.
  • You're building a short-lived internal tool or prototype where a 6–12 month lifespan is acceptable and a frozen dependency is fine.
  • The dominant requirement is per-method cache control and you'd otherwise hand-roll cache invalidation in controllers.

Look elsewhere when:

  • It's a greenfield product or anything with a multi-year support horizon. An archived package with zero dependents and no security response process is a liability on the critical path.
  • You're on a recent Laravel or PHP version and haven't verified compatibility — archived packages rot silently against framework upgrades, and the failure mode is subtle (cache keys, model hydration) rather than a clean error.
  • Your team has no appetite to own a fork. "Abandoned but MIT" is only an advantage if someone is actually assigned to it.
  • The real problem is read scale, not code organization. Cache tags in Laravel, Redis with explicit invalidation, read replicas, or a CDN solve throughput more directly than an abstraction layer.
  • You need cache coherence across services, event-driven invalidation, or write-through semantics — this is a single-app pattern, and stretching it into distributed territory is where it breaks.
  • A framework-native alternative is sufficient: Eloquent scopes, query objects, or a thin custom repository interface get most of the testability benefit with none of the abandonment risk.

Adoption gate (all must be true): named internal owner; fork vendored into your VCS with your own CI and version pin; compatibility verified against your exact Laravel/PHP versions; a written exit plan to a native implementation; and an explicit acceptance that you will not receive upstream fixes.

How to Pitch It (Stakeholders)

To executives: We evaluated an open-source Laravel library that abstracts how the app talks to its database and caches reads. The concept is sound and would normally save us a few weeks of engineering; the specific package, however, is archived and unmaintained. My recommendation is not to adopt it as a dependency. Instead, we either (a) keep and own the copy we already have, budgeting modest ongoing maintenance for it, or (b) borrow the pattern and build a small in-house version. Either way, the decision is low-cost and reversible, and it prevents us from quietly inheriting an unsupported component on our critical path. There is no license cost — MIT — the cost here is ownership, not procurement.

To engineering: This is a well-shaped implementation of Active Repository with unusually fine-grained cache control, and it's a good read even if we never depend on it. The blocker is lifecycle, not design: archived repo, no dependents, no upstream security response, and a re-published fork namespace that muddies provenance. Ask: (1) is it already in our tree anywhere? (2) do we have an owner? (3) what's the cost to vendor-and-pin versus reimplement the subset we actually use? I want an ADR either way, and I want the caching semantics documented — they're the only part that's genuinely hard to reproduce.

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.
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
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle