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

Laravelrepositories Laravel Package

aubinlrx/laravelrepositories

Repository pattern helpers for Laravel: wrap Eloquent models behind clean interfaces so data access is easier to organize, swap, and test. A lightweight package for structuring queries, keeping controllers slim in larger apps, and defining explicit contracts between application layers.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package implements the classic Repository pattern on top of Eloquent — typically an abstract base repository providing all/find/create/update/delete/paginate plus per-model concrete repositories. The pattern itself is defensible: it gives interface-based test seams, centralizes query logic, and keeps controllers thin. But the value the package adds over a hand-rolled abstract class is small (on the order of 100–200 lines). It does not enforce domain boundaries, aggregate separation, or transaction policy, so architectural benefit is mostly "pattern fit, weak package fit." Note that Eloquent is already a persistence abstraction; a repository layer is only worth its cost if you commit to interface-per-aggregate discipline and mock those interfaces in tests.

Integration feasibility. Composer package, MIT-licensed, no native extensions. Constraints target illuminate/* ^5.0 with PHP ~5.5–5.6 era syntax. On Laravel 5.0–5.4 the service provider must be registered manually (auto-discovery arrived in 5.5). Effort on a Laravel 5.x codebase: hours to a day for a first module. On Laravel 6+ the Composer solve will conflict.

Technical risk. Abandonment dominates. Last release 2015-05-12; 12 stars; effectively no user base. That implies no CVE response, no PHP 8 verification, and no compatibility work for Eloquent API drift (lists()→pluck(), paginate() signature changes, Builder return types, model-event behavior). Expect PHPStan/Larastan noise. Secondary risk is leaky abstraction: if repository methods return Query\Builder instead of collections/models, the layer provides no isolation and just adds indirection.

Key questions for the maintainer spike.

  • Which exact Laravel/PHP versions are supported in practice — does it boot on 5.5/5.6/PHP 7.x?
  • Does it ship criteria/filter objects, caching decorators, or presenters, or only CRUD wrappers?
  • Are methods contract-defined via interfaces, or is it inheritance-only?
  • Does it expose transactions, chunk/cursor, and eager-loading, or hide them?
  • What do repository methods return — Collection, array, or Builder?
  • Any tests in the repo, and do they run?

Integration Approach

Stack fit. Laravel 5.0–5.5 only; realistic PHP ceiling ~7.0–7.1. Incompatible with Laravel 6/7/8/9/10/11. If the target application is on a modern Laravel, this is a non-starter without forking.

Options, ranked.

  1. Do not adopt; build in-house (recommended). Write an abstract BaseRepository plus per-aggregate interfaces and bind them in a service provider. Cost: 1–2 engineer-days, zero dependency risk, full control over return types and transactions. This captures ~all of the package's value.
  2. Fork and vendor. Copy into packages/ or app/Repositories, strip the Composer version constraint, add contract tests and static analysis, and treat it as internal code. Viable if team familiarity with this specific API is a factor.
  3. Adopt as-is on legacy 5.x. Only if the app is already pinned to Laravel 5.x and the migration is scoped to a non-critical module. Pin exact versions, commit the lockfile, and add a composer audit gate.

--ignore-platform-reqs and replace aliasing to force installation on Laravel 8+ are smells — they shift the failure from install time to runtime.

Sequencing.

  1. Confirm target Laravel/PHP versions and whether the Composer solve resolves cleanly.
  2. Timeboxed spike (≤1 day) in a branch: install, boot the provider, exercise CRUD + paginate + a transaction against a scratch model.
  3. Define repository interfaces for one bounded context only.
  4. Bind implementations in a dedicated service provider; keep controllers unaware of Eloquent.
  5. Add contract tests that run against both the repository and raw Eloquent to prove equivalence.
  6. Migrate one module, measure, then hold a go/no-go gate before broad rollout.

Operational Impact

Maintenance. Effectively zero upstream. Adoption means permanent ownership: fork, patch, document, and carry it through every PHP and Laravel upgrade. Budget a small recurring maintenance line rather than treating it as a one-time install.

Support. No maintainer response, no issue triage, no community to consult. Internal documentation becomes the only knowledge source.

Scaling. Runtime overhead is negligible — it is a thin delegation layer. The real scaling levers remain query design: N+1 from hidden lazy loads, unbounded all() on large tables, missing chunk/cursor support for batch jobs, and pagination semantics. If the package offers caching or criteria decorators, that is where genuine value could sit; verify before assuming.

Failure modes to plan for.

  • Composer conflict blocking a framework upgrade (highest likelihood, highest cost).
  • PHP 8 incompatibility surfacing as fatal errors on upgrade.
  • Silent Builder passthrough, erasing the abstraction's testability benefit.
  • Transaction leakage — repository methods opening transactions without a surrounding unit-of-work policy.
  • Memory exhaustion from unpaginated collection returns in jobs or exports.
  • Static-analysis and CI breakage as tooling modernizes.

Ramp-up. Low for anyone who knows the pattern: 1–2 days to productivity. The onboarding cost is not the pattern but the bespoke internals — require a short README covering method contracts, return types, and transaction expectations. Given a score of 0.06 and a decade of dormancy, the TPM recommendation is to treat this as a reference implementation to copy, not a dependency to adopt.

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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource