Laravel releases a new major version every year, typically in February or March. For package authors, completing support for new versions quickly is a meaningful contribution to the ecosystem and a strong signal of package quality.Documentation Index
Fetch the complete documentation index at: https://kawax.biz/llms.txt
Use this file to discover all available pages before exploring further.
This page is a companion to Laravel Package Development. It assumes familiarity with package basics such as service providers and
composer.json configuration.Responding to a Laravel major version upgrade
Step-by-step process
Update the require constraint in composer.json
Add the new version to your dependency range. Use When you are ready to drop support for an older version, remove the old constraint.
|| to support multiple versions simultaneously.Run your tests against the new version
Update dependencies and run your test suite locally or in CI.If tests pass, basic compatibility is confirmed. If not, check the official upgrade guide for removed or changed APIs and fix your package accordingly.
Add the new version to your GitHub Actions test matrix
Add the new Laravel version to your CI matrix so compatibility is verified continuously. See Test matrix configuration example below.
Learn from official packages
When in doubt, check how official Laravel packages handle version constraints. These packages are maintained by the Laravel team and are updated first. Theirilluminate/* constraint syntax is the most reliable reference.
Updating PHP version requirements
A Laravel major version upgrade sometimes raises the minimum PHP requirement as well. Update the PHP constraint in yourcomposer.json accordingly.
| Laravel | Minimum PHP |
|---|---|
| Laravel 11 | PHP 8.2 |
| Laravel 12 | PHP 8.2 |
| Laravel 13 | PHP 8.3 |
| Laravel 14 | PHP 8.4 |
Raising the minimum PHP version to use new language features
If you want to use features introduced in PHP 8.3 or later (typed constants, new random functions, etc.), you need to raise the minimum PHP requirement. Because raising the minimum PHP version is a breaking change under semantic versioning, it is best done alongside a package major version bump.Strategy for ending support for old versions
Maintaining old versions indefinitely increases maintenance costs over time. Defining a clear support policy and regularly dropping old versions leads to a healthier package.When to drop support
A common approach is to align with Laravel’s support lifecycle. Laravel provides bug fix support for 18 months and security fix support for 2 years per release. Adopting the same policy gives users clear expectations.| Criterion | Description |
|---|---|
| Laravel’s official end of life | Drop support when Laravel itself stops receiving bug fixes |
| Usage statistics | Drop support when downloads for the old version drop significantly on Packagist |
| Feature development friction | Drop support when maintaining old compatibility makes adding new features significantly harder |
Document your support policy in README
Include a compatibility table in yourREADME.md so users know which versions are supported.
The cost of maintaining old versions
Continuing to support old versions introduces the following costs.- Duplicate bug fixes — the same bug must be fixed across multiple branches
- Branching code complexity — version-specific implementation differences accumulate in conditional logic
- Bloated test matrices — CI run times grow with every additional version combination
- Backporting security patches — applying fixes safely to old branches requires additional care
The benefits of acting early
When your package supports a new Laravel version on release day, users can upgrade immediately. This is a strong trust signal for the package.Validate against the development version
Laravel does not publish beta or RC releases. Instead, you can install the next version in development usingdev-master or the @dev constraint. Testing before the final release allows for zero-day compatibility.
@dev constraint.
minimum-stability to dev to resolve development version dependencies.
The first step is just a composer.json change
You do not need a fully verified implementation before releasing. Simply updating the version constraint incomposer.json lets users install the package on the new Laravel version.
Where to track release information
| Source | Content |
|---|---|
| GitHub Watch | Enable “Watch → Custom → Releases” on the repository to receive email notifications. Set this up for framework and other key packages |
| Laravel official blog | Major release announcements and feature overviews |
| Laravel upgrade guide | Breaking changes summary |
| laravel/framework commit log | Track changes to the next version early by following commits directly |
Test matrix configuration example
The following GitHub Actions workflow runs your test suite against multiple Laravel and PHP version combinations.Why fail-fast: false matters
Settingfail-fast: false allows all matrix combinations to run even if one fails. You get a complete picture of which version combinations have problems in a single CI run.
Updating the matrix over time
Add new Laravel versions to the matrix when they are released. Remove old versions when you drop support.Sample composer.json
A complete example of acomposer.json configured for multi-version support.
Version upgrade checklist
Before a new Laravel release
Before a new Laravel release
- Test against the development version (
dev-masteror@dev) - Review the official upgrade guide for breaking changes
- Implement any required fixes in a development branch
- Add the new version to your test matrix and verify CI passes
Initial response after release
Initial response after release
- Add the new version to the
illuminate/*constraint incomposer.json - Update the PHP requirement if needed
- Update
orchestra/testbenchinrequire-devto match - Tag a new release and verify it appears on Packagist
- Update the version compatibility table in README
Dropping support for an old version
Dropping support for an old version
- Announce end of support in the CHANGELOG and README
- Remove the old constraint from
composer.json - Remove the old version from the test matrix
- Clean up any version-specific conditional code
Related pages
Laravel Package Development
Learn the fundamentals of Laravel package development, including service providers and publishing resources.
Advanced Testing with Pest
Write expressive package tests using Pest’s Expectation API, datasets, and fakes.