wimski/laravel-model-repositories
A lightweight repository pattern for Laravel Eloquent models. Provides a base repository with common query and CRUD helpers plus contracts, so you can keep persistence logic organized, reusable, and easy to test.
This release is a compatibility-only major: v7.0.0 adds Laravel 13 support and removes Laravel 11. There are no new APIs to learn, so "getting started" is really about getting onto a supported version pair before you write any code against the package.
php artisan --version. If you're on Laravel 11, you cannot install v7 — you must either upgrade the framework to 12/13 or stay on the v6 line.composer.json and look at require for illuminate/* and php. The removed Laravel 11 support and any PHP floor bump are the two things that will actually block you.composer require vendor/package:^7.0 --with-all-dependencies
The --with-all-dependencies flag matters here because a major version bump usually drags framework constraints along with it.composer update plus your existing test suite passing unchanged — if the package only bumped framework constraints, your tests should be the proof that nothing else moved.If you are starting a fresh Laravel 13 project, v7.0.0 is the version you want; there is no configuration or bootstrapping change implied by the release notes.
Pin the package to the framework, not the other way round. In composer.json, keep the package constraint explicit and let the framework version drive resolution:
"require": {
"php": "^8.3",
"laravel/framework": "^12.0|^13.0",
"vendor/package": "^7.0"
}
CI matrix. The useful matrix for this release is framework × package, not just PHP × package:
matrix:
laravel: ['12.*', '13.*']
package: ['^6.0', '^7.0']
exclude:
- laravel: '13.*'
package: '^6.0' # v6 predates Laravel 13 support
- laravel: '12.*'
package: '^7.0' # only if you want to hold 12 on v6 — see Gotchas
Upgrade workflow for an existing app:
^7.0 alone, run the suite. This isolates package breakage from framework breakage.illuminate/* or laravel/framework constraint shims you added to force resolution.Long-lived branches. If you maintain a package that depends on this one, widen your own constraint rather than hard-pinning:
"vendor/package": "^6.0|^7.0"
and let Composer pick based on the host app's framework version. Hard-pinning ^7.0 in a library silently drops Laravel 11 consumers.
Deployment tip. Because this is a major, deploy it behind a feature-flagged release or a canary rather than a Friday-night hotfix — even compatibility-only majors can surface transitive dependency drift (a bumped symfony/* or nesbot/carbon) that only shows up at runtime.
composer update on a Laravel 11 app will fail resolution rather than warn. Plan the framework upgrade as a prerequisite, not a follow-up.composer why-not vendor/package 7.0.0 is the fastest way to see what's holding you back — usually a transitive dependency or a stale composer.lock. Run it before you start hand-editing constraints.php artisan config:clear and php artisan vendor:publish --tag=... --force review after upgrading; diff published config rather than blindly overwriting.src/ rather than assuming.laravel/framework:^13.0 explicitly to force the conflict to the surface, read the full Composer error (it names the exact constraint chain), then remove the temporary line.composer.lock after the upgrade, and don't let composer update be part of your deploy step for this release — resolve once, review the diff, ship the lock.Caveat: the release notes describe only framework support changes. Everything above is scoped to version compatibility. If the package's own API changes in a future patch, re-check that section against its documentation rather than relying on this assessment.
How can I help you explore Laravel packages today?