Laravel Compatibility Explorer

Which PHP and PHPUnit versions does a Laravel release support? Which Laravel versions does a package support? What did the upgrade guide say will break? Each row below is taken from the Laravel documentation, the laravel/framework composer.json or Packagist, and links to that source.

Data generated 2026-11-29 by scripts/build-compat-data.py. "Allowed by composer.json" means the constraint permits it, not that the maintainers tested it. Package rows show the latest release in each major series, not earlier releases in that series. Check the linked source before you upgrade a production app.

Filter by your versions

Laravel, PHP and PHPUnit

LaravelPHP supported (docs)PHP in composer.jsonPHPUnit allowedReleasedBug fixes untilSecurity fixes untilSources
13 8.3 - 8.5 ^8.3 ^11.5.50 || ^12.5.8 || ^13.0.3
majors 11, 12, 13
March 17th, 2026 Q3 2027 March 17th, 2028 Support policy
composer.json
12 8.2 - 8.5 ^8.2 ^10.5.35|^11.5.3|^12.0.1
majors 10, 11, 12
February 24th, 2025 August 13th, 2026 February 24th, 2027 Support policy
composer.json
11 8.2 - 8.4 ^8.2 ^10.5.35|^11.3.6|^12.0.1
majors 10, 11, 12
March 12th, 2024 September 3rd, 2025 March 12th, 2026 Support policy
composer.json
10 8.1 - 8.3 ^8.1 ^10.0.7
majors 10
February 14th, 2023 August 6th, 2024 February 4th, 2025 Support policy
composer.json
9 8.0 - 8.2 ^8.0.2 ^9.5.8
majors 9
February 8th, 2022 August 8th, 2023 February 6th, 2024 Support policy
composer.json
8 7.3 - 8.1 ^7.3|^8.0 ^8.5.19|^9.5.8
majors 8, 9
September 8th, 2020 July 26th, 2022 January 24th, 2023 Support policy
composer.json
7 7.2 - 8.0 ^7.2.5|^8.0 ^8.4|^9.3.3
majors 8, 9
March 3rd, 2020 October 6th, 2020 March 3rd, 2021 Support policy
composer.json
6 (LTS) 7.2 - 8.0 ^7.2.5|^8.0 ^7.5.15|^8.4|^9.3.3
majors 7, 8, 9
September 3rd, 2019 January 25th, 2022 September 6th, 2022 Support policy
composer.json

PHP and PHPUnit constraints come from the composer.json of the latest laravel/framework release branch at the commit linked on each row. The dates come from the Laravel release notes.

PHPUnit and PHP

PHPUnitLatestRequires PHPSource
1313.4.8>=8.4.1Packagist
1212.5.45>=8.3Packagist
1111.5.58>=8.2Packagist
1010.5.67>=8.1Packagist
99.6.39>=7.3Packagist
88.5.57>=7.2Packagist
77.5.20^7.1Packagist
66.5.14^7.0Packagist

Packages

Showing the Laravel versions each package series allows through its illuminate/* or laravel/framework constraint. Use the filters above.

PackageSeriesLatestLaravel allowedPHPConstraintSource
laravel/sanctum
First-party
4.x 4.5.0
2026-11-11
12, 13 ^8.2 illuminate/support: ^12.0|^13.0 Packagist
laravel/sanctum
First-party
3.x 3.3.3
2023-12-19
9, 10 ^8.0.2 illuminate/support: ^9.21|^10.0 Packagist
laravel/sanctum
First-party
2.x 2.15.1
2022-04-08
8, 9 ^7.2|^8.0 illuminate/support: ^6.9|^7.0|^8.0|^9.0 Packagist
laravel/passport
First-party
13.x 13.12.0
2026-11-12
12, 13 ^8.2 illuminate/support: ^12.0|^13.0 Packagist
laravel/passport
First-party
12.x 12.4.3
2026-02-19
9, 10, 11, 12 ^8.0 illuminate/support: ^9.21|^10.0|^11.0|^12.0 Packagist
laravel/passport
First-party
11.x 11.10.6
2024-03-01
9, 10 ^8.0 illuminate/support: ^9.0|^10.0 Packagist
laravel/passport
First-party
10.x 10.4.2
2023-02-21
8, 9 ^7.3|^8.0 illuminate/support: ^8.37|^9.0 Packagist
laravel/horizon
First-party
5.x 5.52.0
2026-11-16
12, 13 ^8.2 illuminate/support: ^12.0|^13.0 Packagist
laravel/telescope
First-party
5.x 5.29.0
2026-11-11
12, 13 ^8.2 laravel/framework: ^12.0|^13.0 Packagist
laravel/telescope
First-party
4.x 4.17.6
2024-02-08
8, 9, 10 ^8.0 laravel/framework: ^8.37|^9.0|^10.0 Packagist
laravel/socialite
First-party
5.x 5.33.0
2026-11-11
12, 13 ^8.2 illuminate/support: ^12.0|^13.0 Packagist
laravel/scout
First-party
11.x 11.11.0
2026-11-17
12, 13 ^8.2 illuminate/support: ^12.0|^13.0 Packagist
laravel/scout
First-party
9.x 9.8.1
2023-02-14
8, 9, 10 ^7.3|^8.0 illuminate/support: ^8.0|^9.0|^10.0 Packagist
laravel/scout
First-party
8.x 8.6.1
2021-04-06
8 ^7.2|^8.0 illuminate/support: ^6.0|^7.0|^8.0 Packagist
laravel/cashier
First-party
16.x 16.11.0
2026-11-17
12, 13 ^8.2 illuminate/support: ^12.0|^13.0 Packagist
laravel/cashier
First-party
15.x 15.8.0
2026-03-30
10, 11, 12, 13 ^8.1 illuminate/support: ^10.0|^11.0|^12.0|^13.0 Packagist
laravel/cashier
First-party
14.x 14.14.0
2023-11-21
9, 10 ^8.0 illuminate/support: ^9.21|^10.0 Packagist
laravel/cashier
First-party
13.x 13.17.0
2023-03-01
8, 9, 10 ^7.3|^8.0 illuminate/support: ^8.37|^9.0|^10.0 Packagist
laravel/cashier
First-party
12.x 12.17.2
2022-08-04
8, 9 ^7.2.5|^8.0 illuminate/support: ^6.0|^7.0|^8.0|^9.0 Packagist
laravel/fortify
First-party
1.x 1.44.0
2026-11-23
12, 13 ^8.2 illuminate/support: ^12.0|^13.0 Packagist
laravel/breeze
First-party
2.x 2.4.2
2026-05-14
11, 12, 13 ^8.2.0 illuminate/support: ^11.0|^12.0|^13.0 Packagist
laravel/breeze
First-party
1.x 1.29.1
2024-03-04
10 ^8.1.0 illuminate/support: ^10.17 Packagist
laravel/jetstream
First-party
5.x 5.5.3
2026-05-19
11, 12, 13 ^8.2.0 illuminate/support: ^11.0|^12.0|^13.0 Packagist
laravel/jetstream
First-party
4.x 4.3.1
2024-02-29
10 ^8.1.0 illuminate/support: ^10.17 Packagist
laravel/jetstream
First-party
1.x 1.7.2
2022-01-25
8, 9 ^7.3|^8.0 illuminate/support: ^8.0|^9.0 Packagist
laravel/octane
First-party
2.x 2.26.0
2026-11-18
12, 13 ^8.2.0 laravel/framework: ^12.69.0|^13.30.0 Packagist
laravel/octane
First-party
1.x 1.5.6
2023-05-16
8, 9, 10 ^8.0 laravel/framework: ^8.83.26|^9.38.0|^10.0 Packagist
laravel/reverb
First-party
1.x 1.14.0
2026-11-16
12, 13 ^8.2 illuminate/support: ^12.0|^13.0 Packagist
laravel/pulse
First-party
1.x 1.11.0
2026-11-11
12, 13 ^8.2 illuminate/support: ^12.0|^13.0 Packagist
laravel/sail
First-party
1.x 1.71.0
2026-11-11
12, 13 ^8.2 illuminate/support: ^12.0|^13.0 Packagist
livewire/livewire
Community
4.x 4.4.10
2026-11-24
10, 11, 12, 13 ^8.1 illuminate/support: ^10.0|^11.0|^12.0|^13.0 Packagist
livewire/livewire
Community
3.x 3.8.12
2026-11-21
10, 11, 12, 13 ^8.1 illuminate/support: ^10.0|^11.0|^12.0|^13.0 Packagist
livewire/livewire
Community
2.x 2.12.8
2024-07-13
8, 9, 10 ^7.2.5|^8.0 illuminate/support: ^7.0|^8.0|^9.0|^10.0 Packagist
livewire/livewire
Community
1.x 1.3.9
2021-08-12
8 ^7.1.3 illuminate/support: ~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0 Packagist
inertiajs/inertia-laravel
Community
3.x 3.8.0
2026-11-22
11, 12, 13 ^8.2.0 laravel/framework: ^11.35|^12.0|^13.0 Packagist
inertiajs/inertia-laravel
Community
2.x 2.0.28
2026-09-25
10, 11, 12, 13 ^8.1.0 laravel/framework: ^10.0|^11.0|^12.0|^13.0 Packagist
inertiajs/inertia-laravel
Community
1.x 1.3.4
2025-12-15
8, 9, 10, 11, 12 ^7.3|~8.0.0|~8.1.0|~8.2.0|~8.3.0|~8.4.0 laravel/framework: ^8.74|^9.0|^10.0|^11.0|^12.0 Packagist
inertiajs/inertia-laravel
Community
0.x 0.6.11
2023-10-27
8, 9, 10 ^7.2|~8.0.0|~8.1.0|~8.2.0|~8.3.0 laravel/framework: ^6.0|^7.0|^8.74|^9.0|^10.0 Packagist
filament/filament
Community
3.x 3.3.59
2026-11-28
10, 11, 12, 13 ^8.1 illuminate/support: ^10.45|^11.0|^12.0|^13.0 Packagist
filament/filament
Community
2.x 2.17.59
2025-11-11
8, 9, 10 ^8.0 illuminate/support: ^8.6|^9.0|^10.0 Packagist
filament/filament
Community
1.x 1.13.4
2021-12-17
8 ^7.4|^8.0 illuminate/support: ^8.0 Packagist
spatie/laravel-permission
Community
8.x 8.5.1
2026-11-26
12, 13 ^8.3 illuminate/contracts: ^12.0|^13.0 Packagist
spatie/laravel-permission
Community
6.x 6.25.0
2026-03-17
8, 9, 10, 11, 12, 13 ^8.0 illuminate/contracts: ^8.12|^9.0|^10.0|^11.0|^12.0|^13.0 Packagist
spatie/laravel-permission
Community
5.x 5.11.1
2023-10-25
8, 9, 10 ^7.3|^8.0 illuminate/contracts: ^7.0|^8.0|^9.0|^10.0 Packagist
spatie/laravel-permission
Community
3.x 3.18.0
2020-11-09
8 ^7.2.5|^8.0 illuminate/contracts: ^5.8|^6.0|^7.0|^8.0 Packagist
spatie/laravel-medialibrary
Community
11.x 11.23.14
2026-11-23
12, 13 ^8.2 illuminate/support: ^12.0|^13.0 Packagist
spatie/laravel-medialibrary
Community
10.x 10.15.0
2023-11-03
9, 10 ^8.0 illuminate/support: ^9.18|^10.0 Packagist
spatie/laravel-medialibrary
Community
9.x 9.12.4
2022-11-09
8 ^7.4|^8.0 illuminate/support: ^8.71 Packagist
spatie/laravel-medialibrary
Community
8.x 8.10.2
2021-05-22
8 ^7.4|^8.0 illuminate/support: ^6.18|^7.0|^8.0 Packagist
spatie/laravel-medialibrary
Community
7.x 7.20.0
2021-05-26
8 ^7.2|^8.0 illuminate/support: ~5.8.35|^6.0|^7.0|^8.0 Packagist
spatie/laravel-activitylog
Community
5.x 5.1.5
2026-11-13
12, 13 ^8.4 illuminate/support: ^12.0 || ^13.0 Packagist
spatie/laravel-activitylog
Community
4.x 4.12.3
2026-03-24
8, 9, 10, 11, 12, 13 ^8.1 illuminate/support: ^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0 Packagist
spatie/laravel-activitylog
Community
3.x 3.17.0
2021-03-02
8 ^7.3 || ^8.0 illuminate/support: ^6.0 || ^7.0 || ^8.0 Packagist
barryvdh/laravel-debugbar
Community
4.x 4.4.5
2026-10-28
11, 12, 13 ^8.2 illuminate/support: ^11|^12|^13.0 Packagist
barryvdh/laravel-debugbar
Community
3.x 3.16.5
2026-01-23
10, 11, 12 ^8.1 illuminate/support: ^10|^11|^12 Packagist
barryvdh/laravel-dompdf
Community
3.x 3.1.2
2026-02-21
9, 10, 11, 12, 13 ^8.1 illuminate/support: ^9|^10|^11|^12|^13.0 Packagist
barryvdh/laravel-dompdf
Community
2.x 2.2.0
2024-04-25
8, 9, 10, 11 ^7.2 || ^8.0 illuminate/support: ^6|^7|^8|^9|^10|^11 Packagist
barryvdh/laravel-dompdf
Community
1.x 1.0.2
2022-05-19
8, 9 ^7.2 || ^8.0 illuminate/support: ^6|^7|^8|^9 Packagist
barryvdh/laravel-dompdf
Community
0.x 0.9.0
2020-12-27
8 ^7.1 || ^8.0 illuminate/support: ^5.5|^6|^7|^8 Packagist
maatwebsite/excel
Community
4.x 4.0.7
2026-11-17
12, 13 ^8.3 illuminate/support: ^12.0 || ^13.0 Packagist
maatwebsite/excel
Community
3.x 3.1.70
2026-08-13
8, 9, 10, 11, 12, 13 ^7.0||^8.0 illuminate/support: 5.8.*||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0||^12.0||^13.0 Packagist
yajra/laravel-datatables-oracle
Community
13.x 13.3.2
2026-11-27
13 ^8.3 illuminate/support: ^13 Packagist
yajra/laravel-datatables-oracle
Community
12.x 12.7.3
2026-11-27
12 ^8.2 illuminate/support: ^12 Packagist
yajra/laravel-datatables-oracle
Community
11.x 11.1.8
2026-11-27
11 ^8.2 illuminate/support: ^11 Packagist
yajra/laravel-datatables-oracle
Community
10.x 10.11.6
2026-11-27
9, 10 ^8.0.2 illuminate/support: ^9|^10 Packagist
yajra/laravel-datatables-oracle
Community
9.x 9.21.2
2022-07-12
8, 9 ^7.1.3|^8 illuminate/support: 5.8.*|^6|^7|^8|^9 Packagist
yajra/laravel-datatables-oracle
Community
1.x 1.5.0
2014-03-26
8, 9, 10, 11, 12, 13 >=5.3.0 illuminate/support: >=4.0.0 Packagist
tymon/jwt-auth
Community
2.x 2.3.1
2026-10-24
9, 10, 11, 12, 13 ^8.0 illuminate/support: ^9.0|^10.0|^11.0|^12.0|^13.0 Packagist
tymon/jwt-auth
Community
1.x 1.0.2
2020-11-27
8 ^5.5.9|^7.0 illuminate/support: ^5.2|^6|^7|^8 Packagist
orchestra/testbench
Testing
11.x 11.3.0
2026-09-24
13 ^8.3 laravel/framework: ^13.32.0 Packagist
orchestra/testbench
Testing
10.x 10.12.0
2026-09-24
12 ^8.2 laravel/framework: ^12.69.2 Packagist
orchestra/testbench
Testing
9.x 9.18.0
2026-09-24
11 ^8.2 laravel/framework: ^11.56.1 Packagist
orchestra/testbench
Testing
8.x 8.39.0
2026-09-24
10 ^8.1 laravel/framework: ^10.50.3 Packagist
orchestra/testbench
Testing
7.x 7.58.0
2026-09-24
9 ^8.0 laravel/framework: ^9.52.22 Packagist
orchestra/testbench
Testing
6.x 6.48.0
2026-08-26
8 ^7.3 || ^8.0 laravel/framework: ^8.83.27 Packagist
larastan/larastan
Testing
3.x 3.15.0
2026-11-11
11, 12, 13 ^8.2 illuminate/support: ^11.44.2 || ^12.4.1 || ^13 Packagist
larastan/larastan
Testing
2.x 2.11.2
2025-06-10
9, 10, 11 ^8.0.2 illuminate/support: ^9.52.20 || ^10.48.28 || ^11.41.3 Packagist
larastan/larastan
Testing
1.x 1.0.4
2022-11-09
8, 9 ^7.2 || ^8.0 illuminate/support: ^6.0 || ^7.0 || ^8.0 || ^9.0 Packagist
larastan/larastan
Testing
0.x 0.7.15
2021-10-26
8, 9 ^7.2 || ^8.0 illuminate/support: ^6.0 || ^7.0 || ^8.0 || ^9.0 Packagist

Documented breaking changes

From the official upgrade guides, one step at a time (for example 11 to 12). The impact label is Laravel's own. The "Laravel" filter above selects the release you are upgrading to.

UpgradeImpactChangeSource
12 to 13 High Upgrading Using AI You can automate your upgrade using Laravel Boost. Boost is a first-party MCP server that provides your AI assistant with guided upgrade prompts — once installed in any Laravel 12 application, use the /upgrade-laravel-v13 slash command in Claude Code, Cursor, OpenCode, Gemini, or VS Code to begin the upgrade to Laravel 13. This command requires Laravel Boost ^2.0. Updating Dependencies
You should update the following dependencies in your application's composer.json file:
Upgrade guide
12 to 13 High Request Forgery Protection
Laravel's CSRF middleware has been renamed from VerifyCsrfToken to PreventRequestForgery, and now includes request-origin verification using the Sec-Fetch-Site header.
Upgrade guide
12 to 13 Medium Cache serializable_classes Configuration
The default application cache configuration now includes a serializable_classes option set to false. This hardens cache unserialization behavior to help prevent PHP deserialization gadget chain attacks if your...
Upgrade guide
12 to 13 Medium Database upsert With MySQL or MariaDB
Laravel now validates that the caller provides a non-empty value for uniqueBy, and will throw an InvalidArgumentException instead of generating invalid SQL.
Upgrade guide
12 to 13 Low Cache Prefixes and Session Cookie Names
Laravel's default cache and Redis key prefixes now use hyphenated suffixes.
Upgrade guide
12 to 13 Low Container::call and Nullable Class Defaults
Container::call now respects nullable class parameter defaults when no binding exists, matching constructor injection behavior introduced in Laravel 12:
Upgrade guide
12 to 13 Low MySQL DELETE Queries With JOIN, ORDER BY, and LIMIT
Laravel now compiles full DELETE ... JOIN queries including ORDER BY and LIMIT for MySQL grammar.
Upgrade guide
12 to 13 Low Polymorphic Pivot Table Name Generation
When table names are inferred for polymorphic pivot models using custom pivot model classes, Laravel now generates pluralized names.
Upgrade guide
12 to 13 Low Collection Model Serialization Restores Eager-Loaded Relations
When Eloquent model collections are serialized and restored (such as in queued jobs), eager-loaded relations are now restored for the collection's models.
Upgrade guide
12 to 13 Low JobAttempted Event Exception Payload
The Illuminate\Queue\Events\JobAttempted event now exposes the exception object (or null) via $exception, replacing the previous boolean $exceptionOccurred property:
Upgrade guide
12 to 13 Low QueueBusy Event Property Rename
The Illuminate\Queue\Events\QueueBusy event property $connection has been renamed to $connectionName for consistency with other queue events.
Upgrade guide
12 to 13 Low Domain Route Registration Precedence
Routes with an explicit domain are now prioritized before non-domain routes in route matching.
Upgrade guide
12 to 13 Low Session serialization Configuration
To help prevent PHP deserialization gadget chain attacks, the default application skeleton now sets the session serialization option to json in the config/session.php file.
Upgrade guide
12 to 13 Low Manager extend Callback Binding
Custom driver closures registered via manager extend methods are now bound to the manager instance.
Upgrade guide
12 to 13 Low Str Factories Reset Between Tests
Laravel now resets custom Str factories during test teardown.
Upgrade guide
12 to 13 Low Symfony PHP 8.5 Polyfill and Global Function Conflicts
Laravel 13 introduces a dependency on symfony/polyfill-php85. On PHP versions below 8.5, this polyfill defines global functions such as array_first() and array_last() unless they have already been defined earlier...
Upgrade guide
12 to 13 Low Pagination Bootstrap View Names
The internal pagination view names for Bootstrap 3 defaults are now explicit:
Upgrade guide
12 to 13 Low Global Scope Removal in Nested Where Conditions
Global scopes removed inside a nested where closure now apply to the whole query. In previous versions, Laravel silently ignored them and still applied the scope to the outer query. This affects closures passed to...
Upgrade guide
12 to 13 Very Low Store and Repository Contracts: touch
The cache contracts now include a touch method for extending item TTLs. If you maintain custom cache store implementations, you should add this method:
Upgrade guide
12 to 13 Very Low Dispatcher Contract: dispatchAfterResponse
The Illuminate\Contracts\Bus\Dispatcher contract now includes the dispatchAfterResponse($command, $handler = null) method.
Upgrade guide
12 to 13 Very Low ResponseFactory Contract: eventStream
The Illuminate\Contracts\Routing\ResponseFactory contract now includes an eventStream signature.
Upgrade guide
12 to 13 Very Low MustVerifyEmail Contract: markEmailAsUnverified
The Illuminate\Contracts\Auth\MustVerifyEmail contract now includes markEmailAsUnverified().
Upgrade guide
12 to 13 Very Low Model Booting and Nested Instantiation
Creating a new model instance while that model is still booting is now disallowed and throws a LogicException.
Upgrade guide
12 to 13 Very Low HTTP Client Response::throw and throwIf Signatures
The HTTP client response methods now declare their callback parameters in the method signatures:
Upgrade guide
12 to 13 Very Low Default Password Reset Subject
Laravel's default password reset mail subject has changed:
Upgrade guide
12 to 13 Very Low Queued Notifications and Missing Models
Queued notifications now respect the #[DeleteWhenMissingModels] attribute and $deleteWhenMissingModels property defined on the notification class.
Upgrade guide
12 to 13 Very Low Queue Contract Method Additions
The Illuminate\Contracts\Queue\Queue contract now includes queue size inspection methods that were previously only declared in docblocks.
Upgrade guide
12 to 13 Very Low withScheduling Registration Timing
Schedules registered via ApplicationBuilder::withScheduling() are now deferred until Schedule is resolved.
Upgrade guide
12 to 13 Very Low Js::from Uses Unescaped Unicode By Default
Illuminate\Support\Js::from now uses JSON_UNESCAPED_UNICODE by default.
Upgrade guide
11 to 12 High Updating Dependencies
You should update the following dependencies in your application's composer.json file:
Upgrade guide
11 to 12 Medium Models and UUIDv7
The HasUuids trait now returns UUIDs that are compatible with version 7 of the UUID spec (ordered UUIDs). If you would like to continue using ordered UUIDv4 strings for your model's IDs, you should now use the...
Upgrade guide
11 to 12 Low Carbon 3
Support for Carbon 2.x has been removed. All Laravel 12 applications now require Carbon 3.x.
Upgrade guide
11 to 12 Low Concurrency Result Index Mapping
When invoking the Concurrency::run method with an associative array, the results of the concurrent operations are now returned with their associated keys:
Upgrade guide
11 to 12 Low Container Class Dependency Resolution
The dependency injection container now respects the default value of class properties when resolving a class instance. If you were previously relying on the container to resolve a class instance without the default...
Upgrade guide
11 to 12 Low Multi-Schema Database Inspecting
The Schema::getTables(), Schema::getViews(), and Schema::getTypes() methods now include the results from all schemas by default. You may pass the schema argument to retrieve the result for the given schema only:
Upgrade guide
11 to 12 Low Nested Array Request Merging
The $request->mergeIfMissing() method now allows merging nested array data using "dot" notation. If you were previously relying on this method to create a top-level array key containing the "dot" notation version of...
Upgrade guide
11 to 12 Low Route Precedence
The routing behavior when multiple routes have the same name has been unified between cached and uncached routing. This means that uncached routing now matches the first route registered with a given name instead of...
Upgrade guide
11 to 12 Low Local Filesystem Disk Default Root Path
If your application does not explicitly define a local disk in your filesystems configuration, Laravel will now default the local disk's root to storage/app/private. In previous releases, this defaulted to...
Upgrade guide
11 to 12 Low Image Validation Now Excludes SVGs
The image validation rule no longer allows SVG images by default. If you would like to allow SVGs when using the image rule, you must explicitly allow them:
Upgrade guide
11 to 12 Very Low Updated DatabaseTokenRepository Constructor Signature
The constructor of the Illuminate\Auth\Passwords\DatabaseTokenRepository class now expects the $expires parameter to be given in seconds, rather than minutes.
Upgrade guide
11 to 12 Very Low Database Constructor Signature Changes
In Laravel 12, several low-level database classes now require an Illuminate\Database\Connection instance to be provided via their constructors.
Upgrade guide
10 to 11 Medium Cache Cache Key Prefixes Likelihood Of Impact: Very Low Previously, if a cache key prefix was defined for the DynamoDB, Memcached, or Redis cache stores, Laravel would append a : to the prefix. In Laravel 11, the cache key prefix does not receive the : suffix. If you would like to maintain the previous prefixing behavior, you can manually add the : suffix to your cache key prefix. Collections The Enumerable Contract Likelihood Of Impact: Low The dump method of the Illuminate\Support\Enumerable contract has been updated to accept a variadic ...$args argument. If you are implementing this interface you should update your implementation accordingly: 1public function dump(...$args); public function dump(...$args); Database SQLite 3.26.0+ Likelihood Of Impact: High If your application is utilizing an SQLite database, SQLite 3.26.0 or greater is required. Eloquent Model casts Method Likelihood Of Impact: Low The base Eloquent model class now defines a casts method in order to support the definition of attribute casts. If one of your application's models is defining a casts relationship, it may conflict with the casts method now present on the base Eloquent model class. Modifying Columns Likelihood Of Impact: High When modifying a column, you must now explicitly include all the modifiers you want to keep on the column definition after it is changed. Any missing attributes will be dropped. For example, to retain the unsigned, default, and comment attributes, you must call each modifier explicitly when changing the column, even if those attributes have been assigned to the column by a previous migration. For example, imagine you have a migration that creates a votes column with the unsigned, default, and comment attributes: 1Schema::create('users', function (Blueprint $table) {2 $table->integer('votes')->unsigned()->default(1)->comment('The vote count');3}); Schema::create('users', function (Blueprint $table) { $table->integer('votes')->unsigned()->default(1)->comment('The vote count'); }); Later, you write a migration that changes the column to be nullable as well: 1Schema::table('users', function (Blueprint $table) {2 $table->integer('votes')->nullable()->change();3}); Schema::table('users', function (Blueprint $table) { $table->integer('votes')->nullable()->change(); }); In Laravel 10, this migration would retain the unsigned, default, and comment attributes on the column. However, in Laravel 11, the migration must now also include all of the attributes that were previously defined on the column. Otherwise, they will be dropped: 1Schema::table('users', function (Blueprint $table) {2 $table->integer('votes')3 ->unsigned()4 ->default(1)5 ->comment('The vote count')6 ->nullable()7 ->change();8}); Schema::table('users', function (Blueprint $table) { $table->integer('votes') ->unsigned() ->default(1) ->comment('The vote count') ->nullable() ->change(); }); The change method does not change the indexes of the column. Therefore, you may use index modifiers to explicitly add or drop an index when modifying the column: 1// Add an index...2$table->bigIncrements('id')->primary()->change();3 4// Drop an index...5$table->char('postal_code', 10)->unique(false)->change(); // Add an index... $table->bigIncrements('id')->primary()->change(); // Drop an index... $table->char('postal_code', 10)->unique(false)->change(); If you do not want to update all of the existing "change" migrations in your application to retain the column's existing attributes, you may simply squash your migrations: 1php artisan schema:dump php artisan schema:dump Once your migrations have been squashed, Laravel will "migrate" the database using your application's schema file before running any pending migrations. Floating-Point Types Likelihood Of Impact: High The double and float migration column types have been rewritten to be consistent across all databases. The double column type now creates a DOUBLE equivalent column without total digits and places (digits after decimal point), which is the standard SQL syntax. Therefore, you may remove the arguments for $total and $places: 1$table->double('amount'); $table->double('amount'); The float column type now creates a FLOAT equivalent column without total digits and places (digits after decimal point), but with an optional $precision specification to determine storage size as a 4-byte single-precision column or an 8-byte double-precision column. Therefore, you may remove the arguments for $total and $places and specify the optional $precision to your desired value and according to your database's documentation: 1$table->float('amount', precision: 53); $table->float('amount', precision: 53); The unsignedDecimal, unsignedDouble, and unsignedFloat methods have been removed, as the unsigned modifier for these column types has been deprecated by MySQL, and was never standardized on other database systems. However, if you wish to continue using the deprecated unsigned attribute for these column types, you may chain the unsigned method onto the column's definition: 1$table->decimal('amount', total: 8, places: 2)->unsigned();2$table->double('amount')->unsigned();3$table->float('amount', precision: 53)->unsigned(); $table->decimal('amount', total: 8, places: 2)->unsigned(); $table->double('amount')->unsigned(); $table->float('amount', precision: 53)->unsigned(); Dedicated MariaDB Driver Likelihood Of Impact: Very Low Instead of always utilizing the MySQL driver when connecting to MariaDB databases, Laravel 11 adds a dedicated database driver for MariaDB. If your application connects to a MariaDB database, you may update the connection configuration to the new mariadb driver to benefit from MariaDB specific features in the future: 1'driver' => 'mariadb',2'url' => env('DB_URL'),3'host' => env('DB_HOST', '127.0.0.1'),4'port' => env('DB_PORT', '3306'),5// ... 'driver' => 'mariadb', 'url' => env('DB_URL'), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), // ... Currently, the new MariaDB driver behaves like the current MySQL driver with one exception: the uuid schema builder method creates native UUID columns instead of char(36) columns. If your existing migrations utilize the uuid schema builder method and you choose to use the new mariadb database driver, you should update your migration's invocations of the uuid method to char to avoid breaking changes or unexpected behavior: 1Schema::table('users', function (Blueprint $table) {2 $table->char('uuid', 36);3 4 // ...5}); Schema::table('users', function (Blueprint $table) { $table->char('uuid', 36); // ... }); Spatial Types Likelihood Of Impact: Low The spatial column types of database migrations have been rewritten to be consistent across all databases. Therefore, you may remove point, lineString, polygon, geometryCollection, multiPoint, multiLineString, multiPolygon, and multiPolygonZ methods from your migrations and use geometry or geography methods instead: 1$table->geometry('shapes');2$table->geography('coordinates'); $table->geometry('shapes'); $table->geography('coordinates'); To explicitly restrict the type or the spatial reference system identifier for values stored in the column on MySQL, MariaDB, and PostgreSQL, you may pass the subtype and srid to the method: 1$table->geometry('dimension', subtype: 'polygon', srid: 0);2$table->geography('latitude', subtype: 'point', srid: 4326); $table->geometry('dimension', subtype: 'polygon', srid: 0); $table->geography('latitude', subtype: 'point', srid: 4326); The isGeometry and projection column modifiers of the PostgreSQL grammar have been removed accordingly. Doctrine DBAL Removal Likelihood Of Impact: Low The following list of Doctrine DBAL related classes and methods have been removed. Laravel is no longer dependent on this package and registering custom Doctrines types is no longer necessary for the proper creation and alteration of various column types that previously required custom types: Illuminate\Database\Schema\Builder::$alwaysUsesNativeSchemaOperationsIfPossible class property Illuminate\Database\Schema\Builder::useNativeSchemaOperationsIfPossible() method Illuminate\Database\Connection::usingNativeSchemaOperations() method Illuminate\Database\Connection::isDoctrineAvailable() method Illuminate\Database\Connection::getDoctrineConnection() method Illuminate\Database\Connection::getDoctrineSchemaManager() method Illuminate\Database\Connection::getDoctrineColumn() method Illuminate\Database\Connection::registerDoctrineType() method Illuminate\Database\DatabaseManager::registerDoctrineType() method Illuminate\Database\PDO directory Illuminate\Database\DBAL\TimestampType class Illuminate\Database\Schema\Grammars\ChangeColumn class Illuminate\Database\Schema\Grammars\RenameColumn class Illuminate\Database\Schema\Grammars\Grammar::getDoctrineTableDiff() method In addition, registering custom Doctrine types via dbal.types in your application's database configuration file is no longer required. If you were previously using Doctrine DBAL to inspect your database and its associated tables, you may use Laravel's new native schema methods (Schema::getTables(), Schema::getColumns(), Schema::getIndexes(), Schema::getForeignKeys(), etc.) instead. Deprecated Schema Methods Likelihood Of Impact: Very Low The deprecated, Doctrine based Schema::getAllTables(), Schema::getAllViews(), and Schema::getAllTypes() methods have been removed in favor of new Laravel native Schema::getTables(), Schema::getViews(), and Schema::getTypes() methods. When using PostgreSQL and SQL Server, none of the new schema methods will accept a three-part reference (e.g. database.schema.table). Therefore, you should use connection() to declare the database instead: 1Schema::connection('database')->hasTable('schema.table'); Schema::connection('database')->hasTable('schema.table'); Schema Builder getColumnType() Method Likelihood Of Impact: Very Low The Schema::getColumnType() method now always returns actual type of the given column, not the Doctrine DBAL equivalent type. Database Connection Interface Likelihood Of Impact: Very Low The Illuminate\Database\ConnectionInterface interface has received a new scalar method. If you are defining your own implementation of this interface, you should add the scalar method to your implementation: 1public function scalar($query, $bindings = [], $useReadPdo = true); public function scalar($query, $bindings = [], $useReadPdo = true); Dates Carbon 3 Likelihood Of Impact: Medium Laravel 11 supports both Carbon 2 and Carbon 3. Carbon is a date manipulation library utilized extensively by Laravel and packages throughout the ecosystem. If you upgrade to Carbon 3, be aware that diffIn* methods now return floating-point numbers and may return negative values to indicate time direction, which is a significant change from Carbon 2. Review Carbon's change log and documentation for detailed information on how to handle these and other changes. Mail The Mailer Contract Likelihood Of Impact: Very Low The Illuminate\Contracts\Mail\Mailer contract has received a new sendNow method. If your application or package is manually implementing this contract, you should add the new sendNow method to your implementation: 1public function sendNow($mailable, array $data = [], $callback = null); public function sendNow($mailable, array $data = [], $callback = null); Packages Publishing Service Providers to the Application Likelihood Of Impact: Very Low If you have written a Laravel package that manually publishes a service provider to the application's app/Providers directory and manually modifies the application's config/app.php configuration file to register the service provider, you should update your package to utilize the new ServiceProvider::addProviderToBootstrapFile method. The addProviderToBootstrapFile method will automatically add the service provider you have published to the application's bootstrap/providers.php file, since the providers array does not exist within the config/app.php configuration file in new Laravel 11 applications. 1use Illuminate\Support\ServiceProvider;2 3ServiceProvider::addProviderToBootstrapFile(Provider::class); use Illuminate\Support\ServiceProvider; ServiceProvider::addProviderToBootstrapFile(Provider::class); Queues The BatchRepository Interface Likelihood Of Impact: Very Low The Illuminate\Bus\BatchRepository interface has received a new rollBack method. If you are implementing this interface within your own package or application, you should add this method to your implementation: 1public function rollBack(); public function rollBack(); Synchronous Jobs in Database Transactions Likelihood Of Impact: Very Low Previously, synchronous jobs (jobs using the sync queue driver) would execute immediately, regardless of whether the after_commit configuration option of the queue connection was set to true or the afterCommit method was invoked on the job. In Laravel 11, synchronous queue jobs will now respect the "after commit" configuration of the queue connection or job. Rate Limiting Per-Second Rate Limiting Likelihood Of Impact: Medium Laravel 11 supports per-second rate limiting instead of being limited to per-minute granularity. There are a variety of potential breaking changes you should be aware of related to this change. The GlobalLimit class constructor now accepts seconds instead of minutes. This class is not documented and would not typically be used by your application: 1new GlobalLimit($attempts, 2 * 60); new GlobalLimit($attempts, 2 * 60); The Limit class constructor now accepts seconds instead of minutes. All documented usages of this class are limited to static constructors such as Limit::perMinute and Limit::perSecond. However, if you are instantiating this class manually, you should update your application to provide seconds to the class's constructor: 1new Limit($key, $attempts, 2 * 60); new Limit($key, $attempts, 2 * 60); The Limit class's decayMinutes property has been renamed to decaySeconds and now contains seconds instead of minutes. The Illuminate\Queue\Middleware\ThrottlesExceptions and Illuminate\Queue\Middleware\ThrottlesExceptionsWithRedis class constructors now accept seconds instead of minutes: 1new ThrottlesExceptions($attempts, 2 * 60);2new ThrottlesExceptionsWithRedis($attempts, 2 * 60); new ThrottlesExceptions($attempts, 2 * 60); new ThrottlesExceptionsWithRedis($attempts, 2 * 60); Cashier Stripe Updating Cashier Stripe Likelihood Of Impact: High Laravel 11 no longer supports Cashier Stripe 14.x. Therefore, you should update your application's Laravel Cashier Stripe dependency to ^15.0 in your composer.json file. Cashier Stripe 15.0 no longer automatically loads migrations from its own migrations directory. Instead, you should run the following command to publish Cashier Stripe's migrations to your application: 1php artisan vendor:publish --tag=cashier-migrations php artisan vendor:publish --tag=cashier-migrations Please review the complete Cashier Stripe upgrade guide for additional breaking changes. Spark (Stripe) Updating Spark Stripe Likelihood Of Impact: High Laravel 11 no longer supports Laravel Spark Stripe 4.x. Therefore, you should update your application's Laravel Spark Stripe dependency to ^5.0 in your composer.json file. Spark Stripe 5.0 no longer automatically loads migrations from its own migrations directory. Instead, you should run the following command to publish Spark Stripe's migrations to your application: 1php artisan vendor:publish --tag=spark-migrations php artisan vendor:publish --tag=spark-migrations Please review the complete Spark Stripe upgrade guide for additional breaking changes. Passport Updating Passport Likelihood Of Impact: High Laravel 11 no longer supports Laravel Passport 11.x. Therefore, you should update your application's Laravel Passport dependency to ^12.0 in your composer.json file. Passport 12.0 no longer automatically loads migrations from its own migrations directory. Instead, you should run the following command to publish Passport's migrations to your application: 1php artisan vendor:publish --tag=passport-migrations php artisan vendor:publish --tag=passport-migrations In addition, the password grant type is disabled by default. You may enable it by invoking the enablePasswordGrant method in the boot method of your application's AppServiceProvider: 1public function boot(): void2{3 Passport::enablePasswordGrant();4} public function boot(): void { Passport::enablePasswordGrant(); } Sanctum Updating Sanctum Likelihood Of Impact: High Laravel 11 no longer supports Laravel Sanctum 3.x. Therefore, you should update your application's Laravel Sanctum dependency to ^4.0 in your composer.json file. Sanctum 4.0 no longer automatically loads migrations from its own migrations directory. Instead, you should run the following command to publish Sanctum's migrations to your application: 1php artisan vendor:publish --tag=sanctum-migrations php artisan vendor:publish --tag=sanctum-migrations Then, in your application's config/sanctum.php configuration file, you should update the references to the authenticate_session, encrypt_cookies, and validate_csrf_token middleware to the following: 1'middleware' => [2 'authenticate_session' => Laravel\Sanctum\Http\Middleware\AuthenticateSession::class,3 'encrypt_cookies' => Illuminate\Cookie\Middleware\EncryptCookies::class,4 'validate_csrf_token' => Illuminate\Foundation\Http\Middleware\ValidateCsrfToken::class,5], 'middleware' => [ 'authenticate_session' => Laravel\Sanctum\Http\Middleware\AuthenticateSession::class, 'encrypt_cookies' => Illuminate\Cookie\Middleware\EncryptCookies::class, 'validate_csrf_token' => Illuminate\Foundation\Http\Middleware\ValidateCsrfToken::class, ], Telescope Updating Telescope Likelihood Of Impact: High Laravel 11 no longer supports Laravel Telescope 4.x. Therefore, you should update your application's Laravel Telescope dependency to ^5.0 in your composer.json file. Telescope 5.0 no longer automatically loads migrations from its own migrations directory. Instead, you should run the following command to publish Telescope's migrations to your application: 1php artisan vendor:publish --tag=telescope-migrations php artisan vendor:publish --tag=telescope-migrations Spatie Once Package
Laravel 11 now provides its own once function to ensure that a given closure is only executed once. Therefore, if your application has a dependency on the spatie/once package, you should remove it from your...
Upgrade guide
10 to 11 Low Estimated Upgrade Time: 15 Minutes We attempt to document every possible breaking change. Since some of these breaking changes are in obscure parts of the framework only a portion of these changes may actually affect your application. Want to save time? You can use Laravel Shift to help automate your application upgrades. Updating Dependencies Likelihood Of Impact: High PHP 8.2.0 Required Laravel now requires PHP 8.2.0 or greater. curl 7.34.0 Required Laravel's HTTP client now requires curl 7.34.0 or greater. Composer Dependencies You should update the following dependencies in your application's composer.json file: laravel/framework to ^11.0 nunomaduro/collision to ^8.1 laravel/breeze to ^2.0 (If installed) laravel/cashier to ^15.0 (If installed) laravel/dusk to ^8.0 (If installed) laravel/jetstream to ^5.0 (If installed) laravel/octane to ^2.3 (If installed) laravel/passport to ^12.0 (If installed) laravel/sanctum to ^4.0 (If installed) laravel/scout to ^10.0 (If installed) laravel/spark-stripe to ^5.0 (If installed) laravel/telescope to ^5.0 (If installed) livewire/livewire to ^3.4 (If installed) inertiajs/inertia-laravel to ^1.0 (If installed) If your application is using Laravel Cashier Stripe, Passport, Sanctum, Spark Stripe, or Telescope, you will need to publish their migrations to your application. Cashier Stripe, Passport, Sanctum, Spark Stripe, and Telescope no longer automatically load migrations from their own migrations directory. Therefore, you should run the following command to publish their migrations to your application: 1php artisan vendor:publish --tag=cashier-migrations2php artisan vendor:publish --tag=passport-migrations3php artisan vendor:publish --tag=sanctum-migrations4php artisan vendor:publish --tag=spark-migrations5php artisan vendor:publish --tag=telescope-migrations php artisan vendor:publish --tag=cashier-migrations php artisan vendor:publish --tag=passport-migrations php artisan vendor:publish --tag=sanctum-migrations php artisan vendor:publish --tag=spark-migrations php artisan vendor:publish --tag=telescope-migrations In addition, you should review the upgrade guides for each of these packages to ensure you are aware of any additional breaking changes: Laravel Cashier Stripe Laravel Passport Laravel Sanctum Laravel Spark Stripe Laravel Telescope If you have manually installed the Laravel installer, you should update the installer via Composer: 1composer global require laravel/installer:^5.6 composer global require laravel/installer:^5.6 Finally, you may remove the doctrine/dbal Composer dependency if you have previously added it to your application, as Laravel is no longer dependent on this package. Application Structure Laravel 11 introduces a new default application structure with fewer default files. Namely, new Laravel applications contain fewer service providers, middleware, and configuration files. However, we do not recommend that Laravel 10 applications upgrading to Laravel 11 attempt to migrate their application structure, as Laravel 11 has been carefully tuned to also support the Laravel 10 application structure. Authentication Password Rehashing
Laravel 11 will automatically rehash your user's passwords during authentication if your hashing algorithm's "work factor" has been updated since the password was last hashed.
Upgrade guide
10 to 11 Low The UserProvider Contract
The Illuminate\Contracts\Auth\UserProvider contract has received a new rehashPasswordIfRequired method. This method is responsible for re-hashing and storing the user's password in storage when the application's...
Upgrade guide
10 to 11 Low The Authenticatable Contract
The Illuminate\Contracts\Auth\Authenticatable contract has received a new getAuthPasswordName method. This method is responsible for returning the name of your authenticatable entity's password column.
Upgrade guide
10 to 11 Very Low The AuthenticationException Class
The redirectTo method of the Illuminate\Auth\AuthenticationException class now requires an Illuminate\Http\Request instance as its first argument. If you are manually catching this exception and calling the...
Upgrade guide
10 to 11 Very Low Email Verification Notification on Registration
The SendEmailVerificationNotification listener is now automatically registered for the Registered event if it is not already registered by your application's EventServiceProvider. If your application's...
Upgrade guide
9 to 10 Medium Redis Cache Tags
Usage of Cache::tags() is only recommended for applications using Memcached. If you are using Redis as your application's cache driver, you should consider moving to Memcached or upgrade your application to Laravel...
Upgrade guide
9 to 10 Medium Database Expressions
Database "expressions" (typically generated via DB::raw) have been rewritten in Laravel 10.x to offer additional functionality in the future. Notably, the grammar's raw string value must now be retrieved via the...
Upgrade guide
9 to 10 Medium Model "Dates" Property
The Eloquent model's deprecated $dates property has been removed. Your application should now use the $casts property:
Upgrade guide
9 to 10 Medium Monolog 3
Laravel's Monolog dependency has been updated to Monolog 3.x. If you are directly interacting with Monolog within your application, you should review Monolog's upgrade guide.
Upgrade guide
9 to 10 Medium Service Mocking
The deprecated MocksApplicationServices trait has been removed from the framework. This trait provided testing methods such as expectsEvents, expectsJobs, and expectsNotifications.
Upgrade guide
9 to 10 Low Estimated Upgrade Time: 10 Minutes We attempt to document every possible breaking change. Since some of these breaking changes are in obscure parts of the framework only a portion of these changes may actually affect your application. Want to save time? You can use Laravel Shift to help automate your application upgrades. Updating Dependencies Likelihood Of Impact: High PHP 8.1.0 Required Laravel now requires PHP 8.1.0 or greater. Composer 2.2.0 Required Laravel now requires Composer 2.2.0 or greater. Composer Dependencies You should update the following dependencies in your application's composer.json file: laravel/framework to ^10.0 laravel/sanctum to ^3.2 doctrine/dbal to ^3.0 spatie/laravel-ignition to ^2.0 laravel/passport to ^11.0 (Upgrade Guide) laravel/ui to ^4.0 If you are upgrading to Sanctum 3.x from the 2.x release series, please consult the Sanctum upgrade guide. Furthermore, if you wish to use PHPUnit 10, you should delete the processUncoveredFiles attribute from the <coverage> section of your application's phpunit.xml configuration file. Then, update the following dependencies in your application's composer.json file: nunomaduro/collision to ^7.0 phpunit/phpunit to ^10.0 Finally, examine any other third-party packages consumed by your application and verify you are using the proper version for Laravel 10 support. Minimum Stability You should update the minimum-stability setting in your application's composer.json file to stable. Or, since the default value of minimum-stability is stable, you may delete this setting from your application's composer.json file: 1"minimum-stability": "stable", "minimum-stability": "stable", Application Public Path Binding
If your application is customizing its "public path" by binding path.public into the container, you should instead update your code to invoke the usePublicPath method offered by the Illuminate\Foundation\Application...
Upgrade guide
9 to 10 Low The registerPolicies Method
The registerPolicies method of the AuthServiceProvider is now invoked automatically by the framework. Therefore, you may remove the call to this method from the boot method of your application's AuthServiceProvider.
Upgrade guide
9 to 10 Low ULID Columns
When migrations invoke the ulid method without any arguments, the column will now be named ulid. In previous releases of Laravel, invoking this method without any arguments created a column erroneously named uuid:
Upgrade guide
9 to 10 Low The Bus::dispatchNow Method
The deprecated Bus::dispatchNow and dispatch_now methods have been removed. Instead, your application should use the Bus::dispatchSync and dispatch_sync methods, respectively.
Upgrade guide
9 to 10 Low The dispatch() Helper Return Value
Invoking dispatch with a class that does not implement Illuminate\Contracts\Queue would previously return the result of the class's handle method. However, this will now return an...
Upgrade guide
9 to 10 Low Rate Limiter Return Values
When invoking the RateLimiter::attempt method, the value returned by the provided closure will now be returned by the method. If nothing or null is returned, the attempt method will return true:
Upgrade guide
9 to 10 Very Low Query Exception Constructor
The Illuminate\Database\QueryException constructor now accepts a string connection name as its first argument. If your application is manually throwing this exception, you should adjust your code accordingly.
Upgrade guide
9 to 10 Very Low The Redirect::home Method
The deprecated Redirect::home method has been removed. Instead, your application should redirect to an explicitly named route:
Upgrade guide
9 to 10 Very Low Closure Validation Rule Messages
When writing closure based custom validation rules, invoking the $fail callback more than once will now append the messages to an array instead of overwriting the previous message. Typically, this will not affect...
Upgrade guide
9 to 10 Very Low Validation Messages and Closure Rules
Previously, you could assign a failure message to a different key by providing an array to the $fail callback injected into Closure based validation rules. However, you should now provide the key as the first...
Upgrade guide
9 to 10 Very Low Form Request After Method
Within form requests, the after method is now reserved by Laravel. If your form requests define an after method, the method should be renamed or modified to utilize the new "after validation" feature of Laravel's...
Upgrade guide
9 to 10 Optional Middleware Aliases
In new Laravel applications, the $routeMiddleware property of the App\Http\Kernel class has been renamed to $middlewareAliases to better reflect its purpose. You are welcome to rename this property in your existing...
Upgrade guide
9 to 10 None The Language Directory
Though not relevant to existing applications, the Laravel application skeleton no longer contains the lang directory by default. Instead, when writing new Laravel applications, it may be published using the...
Upgrade guide
8 to 9 High Flysystem 3.x
Laravel 9.x has migrated from Flysystem 1.x to 3.x. Under the hood, Flysystem powers all of the file manipulation methods provided by the Storage facade. In light of this, some changes may be required within your...
Upgrade guide
8 to 9 High Symfony Mailer
One of the largest changes in Laravel 9.x is the transition from SwiftMailer, which is no longer maintained as of December 2021, to Symfony Mailer. However, we have tried to make this transition as seamless as...
Upgrade guide
8 to 9 Medium Postgres "Schema" Configuration
The schema configuration option used to configure Postgres connection search paths in your application's config/database.php configuration file should be renamed to search_path.
Upgrade guide
8 to 9 Medium Custom Casts & null
In previous releases of Laravel, the set method of custom cast classes was not invoked if the cast attribute was being set to null. However, this behavior was inconsistent with the Laravel documentation. In Laravel...
Upgrade guide
8 to 9 Medium Belongs To Many firstOrNew, firstOrCreate, and updateOrCreate Methods
The belongsToMany relationship's firstOrNew, firstOrCreate, and updateOrCreate methods all accept an array of attributes as their first argument. In previous releases of Laravel, this array of attributes was compared...
Upgrade guide
8 to 9 Medium The when / unless Methods
As you may know, when and unless methods are offered by various classes throughout the framework. These methods can be used to conditionally perform an action if the boolean value of the first argument to the method...
Upgrade guide
8 to 9 Medium Default Timeout
The HTTP client now has a default timeout of 30 seconds. In other words, if the server does not respond within 30 seconds, an exception will be thrown. Previously, no default timeout length was configured on the HTTP...
Upgrade guide
8 to 9 Medium The lang Directory
In new Laravel applications, the resources/lang directory is now located in the root project directory (lang). If your package is publishing language files to this directory, you should ensure that your package is...
Upgrade guide
8 to 9 Medium The assertDeleted Method
All calls to the assertDeleted method should be updated to assertModelMissing.
Upgrade guide
8 to 9 Medium The password Rule
The password rule, which validates that the given input value matches the authenticated user's current password, has been renamed to current_password.
Upgrade guide
8 to 9 Medium Unvalidated Array Keys
In previous releases of Laravel, you were required to manually instruct Laravel's validator to exclude unvalidated array keys from the "validated" data it returns, especially in combination with an array rule that...
Upgrade guide
8 to 9 Low Estimated Upgrade Time: 30 Minutes We attempt to document every possible breaking change. Since some of these breaking changes are in obscure parts of the framework only a portion of these changes may actually affect your application. Want to save time? You can use Laravel Shift to help automate your application upgrades. Updating Dependencies Likelihood Of Impact: High PHP 8.0.2 Required Laravel now requires PHP 8.0.2 or greater. Composer Dependencies You should update the following dependencies in your application's composer.json file: laravel/framework to ^9.0 nunomaduro/collision to ^6.1 In addition, please replace facade/ignition with "spatie/laravel-ignition": "^1.0" and pusher/pusher-php-server (if applicable) with "pusher/pusher-php-server": "^5.0" in your application's composer.json file. Furthermore, the following first-party packages have received new major releases to support Laravel 9.x. If applicable, you should read their individual upgrade guides before upgrading: Vonage Notification Channel (v3.0) (Replaces Nexmo) Finally, examine any other third-party packages consumed by your application and verify you are using the proper version for Laravel 9 support. PHP Return Types PHP is beginning to transition to requiring return type definitions on PHP methods such as offsetGet, offsetSet, etc. In light of this, Laravel 9 has implemented these return types in its code base. Typically, this should not affect user written code; however, if you are overriding one of these methods by extending Laravel's core classes, you will need to add these return types to your own application or package code: count(): int getIterator(): Traversable getSize(): int jsonSerialize(): array offsetExists($key): bool offsetGet($key): mixed offsetSet($key, $value): void offsetUnset($key): void In addition, return types were added to methods implementing PHP's SessionHandlerInterface. Again, it is unlikely that this change affects your own application or package code: open($savePath, $sessionName): bool close(): bool read($sessionId): string|false write($sessionId, $data): bool destroy($sessionId): bool gc($lifetime): int Application The Application Contract
The storagePath method of the Illuminate\Contracts\Foundation\Application interface has been updated to accept a $path argument. If you are implementing this interface you should update your implementation accordingly:
Upgrade guide
8 to 9 Low Schema Builder registerCustomDoctrineType Method
The registerCustomDoctrineType method has been removed from the Illuminate\Database\Schema\Builder class. You may use the registerDoctrineType method on the DB facade instead, or register custom Doctrine types in the...
Upgrade guide
8 to 9 Low The opis/closure Library
Laravel's dependency on opis/closure has been replaced by laravel/serializable-closure. This should not cause any breaking change in your application unless you are interacting with the opis/closure library directly....
Upgrade guide
8 to 9 Very Low The data_get Helper & Iterable Objects
Previously, the data_get helper could be used to retrieve nested data on arrays and Collection instances; however, this helper can now retrieve nested data on all iterable objects.
Upgrade guide
8 to 9 Very Low The str Helper
Laravel 9.x now includes a global str helper function. If you are defining a global str helper in your application, you should rename or remove it so that it does not conflict with Laravel's own str helper.
Upgrade guide

Spotted a wrong row? Email info@laravelquestions.com with the source link.

Our network