Laravel 13 is the next major release of the popular PHP framework, scheduled for release in Q1 2026. It introduces several breaking changes, new requirements, and a streamlined upgrade path. This article outlines the key changes, the minimum system requirements, and the essential checks you should perform before upgrading from Laravel 12.
Background: Laravel’s Release Cycle
Laravel follows a predictable release schedule: a new major version every 12 months, with minor releases every quarter. Laravel 13 continues this pattern, building on the foundation laid by Laravel 12. The framework’s maintainers focus on modernizing the codebase, improving performance, and adopting the latest PHP features. Each major release typically introduces new abstractions, removes deprecated methods, and raises the minimum PHP version.
Key Changes in Laravel 13
Laravel 13 introduces several notable changes that affect how you write and structure your applications:
- New Folder Structure: The default application structure has been reorganized. The
app/Modelsdirectory is now the default namespace for models, and theapp/Http/Controllersstructure remains but with a newControllerssubfolder for API controllers. This aligns with community best practices and reduces clutter. - Removed Deprecated Methods: All methods and features that were deprecated in Laravel 12 have been removed. This includes the
dispatchNow()method, thearray_*global helpers, and theStr::random()alias (useStr::random()from theIlluminate\Support\Strclass instead). - New Query Builder Interface: The query builder now uses a unified interface for both Eloquent and the database query builder. This means you can use the same methods on both, and it simplifies type-hinting in your repositories.
- Improved Rate Limiting: The rate limiter now supports Redis-based sliding windows out of the box, providing more accurate and scalable rate limiting without extra configuration.
- Enhanced Testing Utilities: Laravel 13 adds a
withMiddleware()method to tests, allowing you to disable or replace middleware during testing more easily. It also introduces afakeQueue()method for queue testing. - PHP 8.3+ Requirement: The minimum PHP version is now 8.3, with full support for PHP 8.4. This enables the use of newer language features like typed class constants and
#\[Deprecated\]attributes.
System Requirements for Laravel 13
Before upgrading, ensure your server meets the following requirements:
- PHP: 8.3 or higher (8.4 recommended)
- Composer: 2.6 or higher
- Database: MySQL 8.0+, PostgreSQL 13+, SQLite 3.26+, or SQL Server 2017+
- Extensions:
ctype,curl,dom,fileinfo,filter,hash,mbstring,openssl,pcre,pdo,session,tokenizer,xml - Node.js (for frontend): 18.x or higher if using Vite or Mix.
Upgrade Checks: Step-by-Step
Upgrading from Laravel 12 to 13 requires careful planning. Follow these checks to ensure a smooth transition:
- Review the Upgrade Guide: The official Laravel upgrade guide (available at laravel.com/docs/13.x/upgrade) lists every breaking change. Read it thoroughly before starting.
- Update PHP: Ensure your local and production environments run PHP 8.3 or higher. You can check with
php -v. - Update Composer Dependencies: In your
composer.json, change thelaravel/frameworkrequirement to^13.0. Then runcomposer updateto fetch the new version. This will also update any dependencies that are compatible. - Check for Deprecated Methods: Use a tool like
larastanor PHPStan with Laravel extensions to detect deprecated method calls in your codebase. Fix them before upgrading. - Update Configuration Files: Laravel 13 may have new configuration options. Run
php artisan config:publishto see any new config files, and compare them with your existing ones. - Run Tests: Execute your test suite after upgrading. Fix any failures related to changed behavior, such as query builder return types or middleware handling.
- Test Queue and Rate Limiting: If you use queues or rate limiting, test these features explicitly, as the underlying implementations have changed.
Common Upgrade Problems and Solutions
Even with careful planning, you may encounter issues. Here are common problems and how to resolve them:
- Composer dependency conflicts: Some third-party packages may not yet support Laravel 13. Check the package’s GitHub repository for compatibility. If not, consider forking or waiting for an update.
- Query builder return type changes: If you relied on a specific return type (e.g.,
BuildervsEloquent\Builder), you may need to adjust type hints. Use the new unified interface to avoid issues. - Middleware in tests: If your tests relied on middleware being applied, use the new
withMiddleware()method to explicitly enable it. - Deprecated global helpers: If you used
array_*helpers likearray_get(), replace them with theArr::get()facade method.
Comparing Laravel 12 vs 13
Laravel 13 is not a complete rewrite, but it does bring meaningful improvements over 12:
- Performance: The query builder improvements and Redis rate limiting offer better performance under load.
- Developer Experience: The new folder structure and unified query builder reduce cognitive overhead.
- Future-proofing: Requiring PHP 8.3 ensures your codebase uses modern, secure PHP.
- Backward compatibility: Most Laravel 12 code will work with minor adjustments, but you must address deprecated methods.
Is Upgrading Worth It?
Upgrading to Laravel 13 is recommended for new projects and for existing projects that can spare the time. The benefits include long-term support (Laravel provides bug fixes for 18 months and security fixes for 2 years for major releases), access to new features, and improved performance. However, if your application relies on packages that are not yet compatible, you may want to wait a few months after release for the ecosystem to catch up.
Frequently Asked Questions
Do I need to upgrade from Laravel 12 to 13?
No, you are not forced to upgrade. Laravel 12 will continue to receive security fixes until February 2027. However, upgrading gives you access to new features and ensures you can use the latest PHP versions.
Can I skip Laravel 12 and go from 11 to 13?
Yes, but you must follow the upgrade guides for both 12 and 13 sequentially. It is often easier to upgrade incrementally to isolate issues.
Will my existing packages work with Laravel 13?
Most popular packages will release compatible versions shortly after Laravel 13’s release. Check the package’s composer.json for the laravel/framework constraint. If it shows ^12.0, wait for an update.
How long does an upgrade take?
For a small application, a few hours. For a large, complex application with many custom packages, it can take several days. The key is to automate testing and use static analysis tools.
What happens if I don’t upgrade?
Your application will continue to work, but you will miss security patches after the support window ends. This leaves your application vulnerable to known exploits.
Where can I find the official upgrade guide?
The official guide is at laravel.com/docs/13.x/upgrade. It is the definitive source for breaking changes and upgrade steps.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Secure Boot Battlefield 6 ASUS: Fix & Enable Guide
- Best Tech Websites to Follow for Pros & Beginners
- Second Wind Quest Walkthrough: Where Winds Meet6.00 min/km
- Enshrouded Weapon Upgrade Guide: How to Improve Gear5.00 min/km
- Connect Phone to Controller for Cloud Gaming
- Python Search Highlighting: Snippets & Matches