Skip to main content

Introduction

Laravel 11 was released in March 2024. This guide walks through upgrading from Laravel 10.x to 11.x.
Estimated time to upgrade is about 15 minutes. Actual impact from breaking changes depends on your app’s size and the features you use.

Automated upgrades with Laravel Shift

You can automate the upgrade with Laravel Shift. Shift updates dependencies and configuration files automatically.

Changes by impact level

Impact: high

  • Dependency updates
  • Application structure changes
  • Floating-point type changes
  • Preserving attributes when modifying columns
  • SQLite minimum version
  • Sanctum update

Impact: medium

  • Carbon 3
  • Password re-hashing
  • Per-second rate limits
  • Spatie Once package

Impact: low

  • Doctrine DBAL removal
  • The Eloquent model casts method
  • Spatial type changes
  • The Enumerable contract
  • The UserProvider contract
  • The Authenticatable contract

Upgrade steps

Update dependencies

Impact: high Update the following dependencies in composer.json.
If you use these packages, update them too.
Then install dependencies:
If you use Cashier Stripe, Passport, Sanctum, Spark Stripe, or Telescope, you must publish their migrations into your app.
Also update the Laravel installer if you use it.
If you previously added doctrine/dbal manually, you can remove it. Laravel 11 no longer depends on this package.

PHP version requirement

Impact: high Laravel 11 requires PHP 8.2.0 or later. Laravel’s HTTP client also requires curl 7.34.0 or later.

Application structure changes

Impact: high Laravel 11 simplifies the default application structure. The number of service providers, middleware, and configuration files has been substantially reduced. That said, we do not recommend attempting to migrate your Laravel 10 app to the new structure when upgrading. Laravel 11 is designed to also support the Laravel 10 application structure. Main structural changes:
  • Middleware, exception handlers, and routing are now configured directly in bootstrap/app.php
  • app/Http/Kernel.php has been removed and integrated into bootstrap/app.php
  • The default number of service providers has been reduced and are managed via bootstrap/providers.php
  • The number of files in config/ has been reduced (you can publish them as needed via php artisan config:publish)

Breaking changes

Authentication

Password re-hashing

Impact: medium Laravel 11 automatically re-hashes passwords at authentication time if the hash algorithm’s “work factor” has changed. If your User model’s password field isn’t named password, specify it via the authPasswordName property on the model.
To disable this feature, add the following to config/hashing.php.

The UserProvider contract

Impact: low The Illuminate\Contracts\Auth\UserProvider contract adds a rehashPasswordIfRequired method. If you have a class implementing this interface, add the method.

The Authenticatable contract

Impact: low The Illuminate\Contracts\Auth\Authenticatable contract adds a getAuthPasswordName method. If you have a class implementing this interface, add the method.

Database

SQLite minimum version

Impact: high If you use SQLite, SQLite 3.26.0 or later is required. Note that new Laravel 11 projects use SQLite as the default database driver.

Preserving attributes when modifying columns

Impact: high When modifying a column, you must explicitly specify every modifier you want retained. Attributes you don’t specify are dropped.
If you don’t want to update all existing migrations, squash them.

Floating-point type changes

Impact: high The double and float migration column types have been unified across databases.
The unsignedDecimal, unsignedDouble, and unsignedFloat methods have been removed. To keep the unsigned attribute, chain it.

The Eloquent model casts method

Impact: low A casts method is now defined on the base Eloquent model class. If your app defines a relation named casts, it collides with the base name and needs to be renamed.

Dedicated MariaDB driver

Impact: very low Laravel 11 adds a dedicated database driver for MariaDB. When connecting to MariaDB, use the mariadb driver in configuration.

Spatial type changes

Impact: low Spatial column types have been unified across databases. Instead of methods like point, lineString, and polygon, use geometry or geography.
Pass subtype and srid to explicitly specify type and spatial reference system.

Doctrine DBAL removal

Impact: low Laravel no longer depends on Doctrine DBAL. The following classes and methods have been removed.
  • Schema\Builder::useNativeSchemaOperationsIfPossible()
  • Connection::getDoctrineConnection()
  • Connection::getDoctrineSchemaManager()
  • Connection::registerDoctrineType()
  • DatabaseManager::registerDoctrineType()
  • The Schema\Grammars\ChangeColumn class
  • The Schema\Grammars\RenameColumn class
For database introspection, use the new native methods Schema::getTables(), Schema::getColumns(), Schema::getIndexes(), and Schema::getForeignKeys().

Dates

Carbon 3

Impact: medium Laravel 11 supports both Carbon 2 and Carbon 3. When upgrading to Carbon 3, note that diffIn* methods now return floating-point numbers, and negative values indicate the direction of time.

Rate limits

Per-second rate limits

Impact: medium Laravel 11 supports rate limits measured in seconds rather than minutes. The GlobalLimit and Limit class constructors now take seconds.
The Limit class’s decayMinutes property has been renamed to decaySeconds and is now in seconds. The ThrottlesExceptions and ThrottlesExceptionsWithRedis constructors also take seconds.

Packages

Publishing service providers

Impact: very low New Laravel 11 apps don’t have a providers array in config/app.php. If your package publishes a service provider, use ServiceProvider::addProviderToBootstrapFile.

Sanctum

Sanctum update

Impact: high Laravel 11 doesn’t support Sanctum 3.x. Update the Sanctum dependency to ^4.0 in your composer.json. Sanctum 4.0 no longer loads its migrations automatically. Publish them with the following command.
Also update the middleware configuration in config/sanctum.php.

Spatie Once package

Impact: medium Laravel 11 provides its own once function. If you use the spatie/once package, remove it from composer.json to avoid conflicts.

Summary

Laravel 11 involves major structural changes, but since Laravel 10’s application structure continues to work, you can migrate incrementally.

References

Last modified on July 13, 2026