Skip to content

Instantly share code, notes, and snippets.

@ollieread
Created March 10, 2026 11:24
Show Gist options
  • Select an option

  • Save ollieread/d7e75e0cf1e155d6f6215ec54880f0d3 to your computer and use it in GitHub Desktop.

Select an option

Save ollieread/d7e75e0cf1e155d6f6215ec54880f0d3 to your computer and use it in GitHub Desktop.

Laravel 13 Changes vs Laravel 12

Generated: 2026-03-09
Source: laravel/framework — commits in 13.x / master [13.x] not present in 12.x
Divergence point: bd6972d001af870bc0569795c823c3a54e372e70
Total PRs: 112


Contents

  1. Upgrading to Laravel 13 (18 PRs)
  2. PHP Attributes (8 PRs)
  3. Database & Query Builder (10 PRs)
  4. Eloquent ORM (7 PRs)
  5. Routing (6 PRs)
  6. Queue (14 PRs)
  7. Cache (8 PRs)
  8. HTTP & Requests (5 PRs)
  9. Console & Artisan (2 PRs)
  10. Events (1 PRs)
  11. Authentication & Security (4 PRs)
  12. Collections (3 PRs)
  13. Testing (3 PRs)
  14. Notifications & Mail (1 PRs)
  15. Container & IoC (2 PRs)
  16. Error Handling (1 PRs)
  17. Process (2 PRs)
  18. Filesystem (1 PRs)
  19. Support & Helpers (1 PRs)
  20. Internal & Infrastructure (15 PRs)

Upgrading to Laravel 13

Minimum requirements, dropped package versions, and dependency bumps that must be addressed before upgrading from Laravel 12.

Breaking Changes

PR Title Merged
#54763 [13.x] Requires PHP 8.3 as minimum version 2025-02-24
#56029 [13.x] Supports Symfony 7.4 & 8.0 2025-06-16
#58537 [13.x] Bump minimum PHPUnit 2026-01-30
#58548 [13.x] Bump minimum symfony/process 2026-01-30
#59053 [13.x] Remove supports for laravel/serializable-closure v1 2026-03-03
#59072 [13.x] Supports pda/pheanstalk 8.0+ and removes 5.x 2026-03-04

New Features

PR Title Merged
#58890 [13.x] Adds PHPUnit 13 support 2026-02-18

Improvements

PR Title Merged
#56488 [13.x] Resolve Symfony Console add() method deprecation 2025-09-07
#58629 [13.x] Ensures compatibility with symfony/console 8 2026-02-05
#59107 [13.x] Update brick/math constraint and rounding mode constant 2026-03-05

Internal / Under the Hood

PR Title Merged
#54701 [13.x] Prepare branch alias for Laravel 13 2025-02-19
#54760 [13.x] Fix Tests/CI environments 2025-02-24
#58612 [13.x] Fix illuminate/json-schema dependencies 2026-02-04
#58975 [13.x] Fix composer.json 2026-02-25
#58995 [13.x] Update the dependencies version 2026-02-25
#58996 [13.x] Normalize composer.json 2026-02-25
#59054 [13.x] Fix symfony/translation deps 2026-03-03
#59069 [13.x] Bump dependencies 2026-03-04

PHP Attributes

Laravel 13 introduces PHP attribute support across the framework — Eloquent models, console commands, routing controllers, test lifecycle, and the container. This is one of the most significant cross-cutting changes in the release.

New Features

PR Title Merged
#58578 Attributes 2026-02-13
#58685 [13.x] Add #[SetUp] / #[TearDown] trait attributes 2026-02-16
#58853 [13.x] Allow aliases to be set in Signature Attribute 2026-02-16
#59030 [13.x] Add #[Middleware] controller attribute 2026-03-01
#59033 [13.x] Add #[ErrorBag] attribute support for FormRequest 2026-03-01
#59048 [13.x] Add #[Authorize] controller middleware attribute 2026-03-02
#59101 [13.x] Add ability to set channel name via #[Log] contextual attribute 2026-03-05

Improvements

PR Title Merged
#59133 [13.x] Rename Middleware attribute parameter from $value to $middleware 2026-03-09

Database & Query Builder

New query builder capabilities and grammar improvements: PDO fetch modes, insertOrIgnoreReturning, straight joins, DELETE with JOIN in MySQL, and raw query type safety.

New Features

PR Title Merged
#55394 [13.x] PDO Fetch modes 2025-04-18
#55786 Feature: add support for straight join in MySQL 2025-05-27
#59025 Add insertOrIgnoreReturning method 2026-02-27

Improvements

PR Title Merged
#57196 [13.x] Compile full DELETE with JOIN including ORDER BY and LIMIT in MySQL grammar 2025-10-06
#59029 Extra validation on query builder upsert 2026-02-28
#59081 [13.x] Indicate that raw queries should be literal strings 2026-03-05

Bug Fixes

PR Title Merged
#55859 Fix typo in Blueprint: datetime => dateTime 2025-05-26
#59083 [13.x] Ensure insertOrIgnoreReturning only marks records as modified when rows are inserted 2026-03-05

Internal / Under the Hood

PR Title Merged
#55294 [13.x] Fixes merge conflict 2025-04-07
#59028 Add corner case tests for insertOrIgnoreReturning 2026-02-28

Eloquent ORM

Changes to Eloquent models, relations, and model inspection tools.

Breaking Changes

PR Title Merged
#55685 [13.x] Do not allow new model instances to be created during boot 2025-05-10
#56832 [13.x] Generate plural morph pivot table name 2025-09-04

New Features

PR Title Merged
#59026 Add saveOrIgnore Eloquent Model method for conflict-safe inserts 2026-03-03

Improvements

PR Title Merged
#58230 [13.x] Return data object from ModelInspector to make show:model more flexible 2026-01-01

Bug Fixes

PR Title Merged
#54816 [13.x] Fix scope removal in nested where conditions 2025-02-27
#59110 [13.x] Fix MorphToMany morphClass type 2026-03-05

Internal / Under the Hood

PR Title Merged
#59080 [13.x] Clean up ModelInfo 2026-03-05

Routing

Route collection ordering, route:list improvements, response factory contracts, and middleware attribute support.

New Features

PR Title Merged
#56306 Add eventStream signature to ResponseFactory contract 2025-07-18

Improvements

PR Title Merged
#55921 [13.x] Register subdomain routes before routes that are not linked to a domain 2025-06-05
#58889 [13.x] Display route binding fields in route:list output 2026-02-18

Bug Fixes

PR Title Merged
#56484 fix: align ResponseFactory::eventStream signature with interface 2025-07-30
#58571 [13.x] Ensure bootstrap withMiddleware works for the DownCommand 2026-02-04

Internal / Under the Hood

PR Title Merged
#58929 [13.x] Define closure type on Middleware 2026-02-20

Queue

Queue system overhaul: class-based queue routing, WorkerStopping reason, contract additions, DeleteWhenMissingModels on notifications, and various fixes.

Breaking Changes

PR Title Merged
#56148 [13.x] Use exception object in JobAttempted event 2025-07-02

New Features

PR Title Merged
#55508 Allow Listeners to dynamically specify deleteWhenMissingModels 2025-04-22
#58094 [13.x] Add ability to default queue by class type 2026-01-09
#58399 [13.x] Add starting to Monitor Contract 2026-01-16
#58428 [13.x] Add dispatchAfterResponse to the Dispatcher Contract 2026-01-19
#58429 Add missing chain method to Dispatcher interface 2026-01-21
#58908 [13.x] Respect DeleteWhenMissingModels attribute on queued notifications 2026-02-18

Improvements

PR Title Merged
#56673 [13.x] Make QueueBusy event consistent with other queue events 2025-08-17
#58341 [13.x] Add reason to WorkerStopping event 2026-01-12
#58914 [13.x] Add missing methods to Queue interface 2026-02-19

Bug Fixes

PR Title Merged
#58477 [13.x] Restore eager-loaded relations when deserializing collections 2026-01-24
#58954 [13.x] Ensure SyncQueue JobAttempted gets the actual exception 2026-02-22

Internal / Under the Hood

PR Title Merged
#58919 [13.x] Resolve DeleteNotificationWhenMissingModelTest 2026-02-19
#59119 [13.x] Fix QueueRoutes docblocks for getRoute and $routes property 2026-03-09

Cache

New flushLocks() capability across all stores, Cache::touch() for TTL extension, enum support in tagged caches, and flush lifecycle events.

New Features

PR Title Merged
#55954 [13.x] Cache::touch() & Store::touch() for TTL Extension 2025-08-12
#58481 [13.x] Add enum types to repository contract / allow enums for tagged caches 2026-01-24
#58907 [13.x] Add flushLocks() support to Cache stores 2026-02-25
#59006 [13.x] Add cache flushLocks() events 2026-02-26

Bug Fixes

PR Title Merged
#57919 [13.x] Fix changes from Laravel 12 2025-11-28

Internal / Under the Hood

PR Title Merged
#57258 [13.x] Resolve issues with tests 2025-10-03
#58973 [13.x] withoutOverlapping docblock 2026-02-24
#59098 [13.x] Use constructor promotion and typed properties in cache flush events 2026-03-05

HTTP & Requests

HTTP client improvements, Request::get() behaviour restored from Symfony, and JSON:API resource refinements.

Improvements

PR Title Merged
#54798 [13.x] Add missing parameters to Response methods throw() and throwIf() 2025-02-26
#57972 [13.x] Default PendingRequest::pool() to use 2 for concurrency 2025-11-29

Bug Fixes

PR Title Merged
#58081 [13.x] Copy Symfony\Component\HttpFoundation\Request::get() functionality to avoid breaking changes 2025-12-11
#59116 [13.x] Fix JsonApiResource flushState maxRelationshipDepth alignment with trait default 2026-03-09

Internal / Under the Hood

PR Title Merged
#59079 [13.x] Clean up JsonApi 2026-03-05

Console & Artisan

Error exit codes for clear commands and deferred schedule registration via ApplicationBuilder.

Improvements

PR Title Merged
#55355 [13.x] Error exit code for clear command 2025-04-10

Bug Fixes

PR Title Merged
#58160 [13.x] Defer registering schedule registered using ApplicationBuilder::withScheduling() 2025-12-28

Events

Support for named arguments in Dispatchable::dispatch() and broadcast().

New Features

PR Title Merged
#59075 [13.x] Add support for named arguments in event dispatching and broadcasting 2026-03-04

Authentication & Security

Origin-based CSRF verification, markEmailAsUnverified() on the MustVerifyEmail interface, and updated default notification subjects.

Security

PR Title Merged
#58400 [13.x] Add origin verification to request forgery protection 2026-01-19

New Features

PR Title Merged
#58701 [13.x] Add markEmailAsUnverified to MustVerifyEmail interface 2026-02-09

Improvements

PR Title Merged
#57882 [13.x] Update reset password notification subject 2025-11-24
#57884 [13.x] Update verification email subject capitalization 2025-11-24

Collections

Additions to the Enumerable interface.

New Features

PR Title Merged
#58610 [13.x] Add hasSole and hasMany to the Enumerable interface 2026-02-04

Internal / Under the Hood

PR Title Merged
#56897 [13.x] Update countBy docblock in Enumerable interface to allow for enum callback 2025-09-03
#58181 [13.x] Improve Enumerable interface docblock types 2026-01-20

Testing

PHPUnit 13 support, #[SetUp]/#[TearDown] attributes, and BusFake improvements.

Bug Fixes

PR Title Merged
#57296 [13.x] Flush Str factories when tearing down test case 2025-10-07
#59118 [13.x] BusFake::assertNothingDispatched should check all dispatches 2026-03-09

Internal / Under the Hood

PR Title Merged
#55358 [13.x] Add #[Override] to the BatchFake class methods 2025-04-11

Notifications & Mail

Additions to the Mailer contract.

New Features

PR Title Merged
#58667 [13.x] Add cc to Mailer contract 2026-02-07

Container & IoC

Manager driver closure binding and BoundMethod default value resolution.

New Features

PR Title Merged
#57173 [13.x] Bind manager instances to custom driver closures 2025-10-06

Bug Fixes

PR Title Merged
#58553 [13.x] Respect default value for class dependencies in BoundMethod::call 2026-01-30

Error Handling

The exception renderer now surfaces the full chain of previous exceptions.

Improvements

PR Title Merged
#58680 [13.x] Adds previous exceptions in exception view 2026-02-13

Process

CarbonInterval support for process timeouts and the command method on the InvokedProcess contract.

New Features

PR Title Merged
#56978 [13.x] Add command method to InvokedProcess contract 2025-09-10
#58842 [13.x] Accept CarbonInterval for PendingProcess timeouts 2026-02-15

Filesystem

Guard against multiple served disks sharing the same URI.

Improvements

PR Title Merged
#58960 [13.x] Throw exception when served disks share the same URI 2026-02-23

Support & Helpers

The Js support class now outputs unescaped unicode by default.

Improvements

PR Title Merged
#58471 [13.x] Use unescaped unicode in Js support class by default 2026-01-23

Internal & Infrastructure

Code quality improvements, docblock fixes, CI pipeline updates, config housekeeping, and other changes that don't directly affect the public API.

Internal / Under the Hood

PR Title Merged
#54876 [13.x] Remove function existence checks 2025-03-04
#54900 [13.x] Removed unneeded default argument 2025-03-05
#55233 [13.x] Fix unresolved merge conflict in Concurrency composer.json 2025-04-01
#56172 [13.x] Change to hyphenate prefixes 2025-07-02
#56303 [13.x] remove superfluous element 2025-07-15
#56307 [13.x] use clearer pagination view names 2025-08-27
#57042 Refactor: replace strpos check with str_contains for clarity 2025-09-12
#57047 Remove unnecessary parameters 2025-09-13
#57176 [README.md] change laravel bootcamp to laravel learn 2025-09-25
#57924 [13.x] Simplify preg_replace_array callback by removing unnecessary foreach loop 2025-11-26
#58628 [13.x] Remove override attribute on removed method 2026-02-05
#59015 [13.x] Refactor parameter names that are implemented from the interface 2026-02-26
#59016 [13.x] Add missing @throws into docblock for various methods 2026-02-27
#59064 [13.x] Rename $key to $offset in ArrayAccess methods to match PHP interface contract 2026-03-04
#59117 [13.x] Fix DoesntContain docblock typo 2026-03-09

Direct Commits (no associated PR)

These commits are unique to 13.x but have no associated pull request:

Commit Description
14fadeb7 allow closure
c4697ff4 update error template
9003a58f Remove supports for PHPUnit 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment