Upgrade Laravel 8 to Laravel 11

Stefan Bogdanescu

Founder & Senior Architect · 2026-06-29

Laravel Company

Upgrading Laravel 8 to Laravel 11: Navigating the Dependency Minefield

Upgrading a major framework version like Laravel—especially jumping from version 8 to version 11—is an exciting opportunity for modernization, but it often comes with the inevitable headache of dependency management. As a senior developer, I’ve seen countless projects stumble over subtle changes in dependency requirements, leading to frustrating errors during the composer update phase.

If you are currently migrating an application from Laravel 8 to Laravel 11, you are stepping into a landscape where PHP version bumps, package deprecations, and internal framework refactoring have all occurred simultaneously. This post will walk you through why these dependency issues arise and provide a practical strategy for successfully navigating this major upgrade.

Understanding the Dependency Shift

The core challenge in upgrading is not just updating the main laravel/framework package; it's aligning all third-party packages with the new framework structure and PHP environment requirements.

Let’s look at the dependency shift you provided:

Old Dependencies (Laravel 8 context):

json
"require": {
    "php": "^7.3|^8.0",
    "laravel/framework": "^8.75",
    "laravel/sanctum": "^2.11",
    // ... other packages
}

New Dependencies (Laravel 11 context):

json
"require": {
    "php": "^8.2",
    "laravel/framework": "^11.0",
    "laravel/sanctum": "^4.0",
    "laravel/ui": "^4.5",
    // ... other packages updated accordingly
}

Notice the significant changes:

  1. PHP Version: The shift from PHP 8.0 compatibility to requiring PHP 8.2 or higher is a major trigger for many dependency conflicts, as newer libraries often rely on features only present in newer PHP versions.
  2. Package Evolution: Packages like laravel/sanctum and laravel/ui have undergone significant refactoring between these versions. This involves changes to how services are injected and how facades interact with the Service Container.

When you remove or update dependencies manually without a systematic approach, Composer struggles to resolve the transitive dependencies correctly, leading to errors like those involving illuminate/support or facade/ignition.

Troubleshooting Specific Errors: Illuminate and Facades

The errors you encountered with illuminate/support and facade/ignition are classic symptoms of a Service Container incompatibility. Laravel 11 introduced deeper changes to how facades and service providers operate compared to previous versions.

When the framework updates, internal classes within Laravel change their structure. If older packages or cached dependencies haven't been properly refreshed, Composer might struggle to reconcile these internal references during the update process.

The Recommended Upgrade Strategy

Instead of manually fiddling with dependency removals, follow this robust strategy for major upgrades:

Step 1: Backup and Snapshot
Ensure you have a clean backup. Commit your current working code before proceeding.

Step 2: Systematic Update
Start by ensuring the core dependencies are aligned. Use Composer to perform the initial update based on your new target version.

bash
composer require laravel/framework:^11.0 --dev
composer update --with-all-dependencies

Step 3: Address Conflict Resolution (The Fix)
If errors persist, it usually means old configuration or cached data is interfering. Try clearing the Composer cache and forcing a clean resolution:

bash
composer clear-cache
composer install --no-dev --optimize-autoloader

For specific issues related to facades or components, sometimes simply updating the package that relies on them resolves the issue. For instance, ensuring your Sanctum version aligns with Laravel 11 standards is crucial. Remember that staying updated with the official documentation from laravelcompany.com provides the most reliable roadmap for these transitions.

Conclusion

Upgrading from Laravel 8 to Laravel 11 is a substantial undertaking, but by treating dependency management as a critical phase rather than an afterthought, you can mitigate most of the pain. The key takeaway is systematic updating coupled with meticulous error checking. By focusing on synchronizing your PHP version, framework packages, and Composer cache, you can successfully transition your application and enjoy all the new features Laravel 11 offers. Happy coding!