Laravel 12.52.0 is a feature-packed minor release that focuses on developer productivity, safer view compilation, and better debugging experience.
Release Overview
- Release Date: February 17, 2026
- Version: 12.52.0
If you’re running a Laravel-powered SaaS, e‑commerce platform, or custom application, this version is worth your attention.
Key Highlights of Laravel 12.52.0
Laravel 12.52.0 introduces several notable improvements:
- New
makeMany()method for model factories. - New
withoutAfterMaking()andwithoutAfterCreating()helpers in factories. - Support for
temporaryUploadUrl()on the local filesystem. - Atomic writes in the Blade compiler to prevent race conditions.
- More informative exception traces for closures and standalone functions.
- Multiple bug fixes in queues, database, testing, and middleware layers.
These updates are non-breaking but can significantly improve your development and testing workflow.
New Factory Features: makeMany() and Helper Methods
Factory::makeMany()
Laravel model factories now include a makeMany() method, allowing you to generate multiple unsaved model instances in a single call.
Example:
// Create 10 in-memory User models (not persisted)
$users = User::factory()->makeMany(10);
// You can then persist them as needed
$users->each->save();
This is especially helpful for:
- Seeding complex relationships without immediately hitting the database.
- Preparing large in‑memory datasets for tests or background jobs.
- Performance‑sensitive test suites where you control when writes occur.
withoutAfterMaking() and withoutAfterCreating()
Laravel 12.52.0 also introduces withoutAfterMaking() and withoutAfterCreating() helpers to temporarily disable factory callbacks.
Example:
// Ignore afterMaking callbacks
$user = User::factory()
->withoutAfterMaking()
->make();
// Ignore afterCreating callbacks
$user = User::factory()
->withoutAfterCreating()
->create();
These helpers are useful when:
- You have global factory callbacks that send notifications, dispatch jobs, or touch external services.
- You want pure models for low‑level tests without side effects.
- You need more deterministic behavior in CI pipelines.
Safer Blade Compilation with Atomic Writes
One of the most impactful internal changes in Laravel 12.52.0 is the adoption of atomic writes in the Blade compiler.
Previously, when multiple processes compiled the same view simultaneously (for example, under heavy load or in multi‑worker environments), you could end up with:
- Partially written compiled views.
- Corrupted cached Blade files.
- Intermittent “weird” view errors that were hard to reproduce.
Now, Blade writes compiled views to a temporary file first, and only after the write is complete does it move that file into place. This atomic pattern eliminates race conditions around compiled views and makes your application more stable under concurrency.
For production Laravel apps running behind load balancers, on queues, or with multiple PHP‑FPM workers, this is a quiet but significant reliability improvement.
Better Exception Traces for Closures and Functions
Debugging closure‑heavy code has also improved in this release.
Exception stack traces now display meaningful names for:
- Closures.
- Standalone functions.
Instead of generic or empty labels, you’ll see more descriptive entries in your logs and error pages, making it easier to track down where a failure originated in routes, pipelines, or callback‑based code.
If you rely heavily on closures for routing, event handlers, or collection pipelines, this change directly improves day‑to‑day debugging.
Additional Fixes and Improvements
Beyond the headline features, Laravel 12.52.0 ships with a series of smaller but important fixes and refinements:
- Queue and async:
- Fixed an issue where deferred callbacks could be discarded when using the
syncqueue driver. Batch::progress()now reliably returns an integer.
- Fixed an issue where deferred callbacks could be discarded when using the
- Database and Eloquent:
- Fixed cases where an empty
Collectionwas returned for non‑model JSON:API resources. - Only merges cached casts for accessed attributes, reducing unnecessary overhead.
- Adjusted SQL Server precision checks and updated MySQL connection strings for modern clients.
- Fixed cases where an empty
- Testing and middleware:
- Type and documentation improvements:
- Many
@returndocblocks have been corrected and standardized. - Throwable docblocks now use fully‑qualified names.
- Many
These changes improve consistency, type safety, and reliability across the framework, especially in larger applications and test suites.
The complete change log can be found below:
- [12.x] Fix:
@returnin doc blocks by @alipowerful7 in #58746 - [12.x] Ensure defer callbacks aren't discarded when using the sync queue by @jackbayliss in #58745
- [12.x] Refactor: remove
Arr::wrap()and addCollection::wrap()by @alipowerful7 in #58748 - Add support for
temporaryUploadUrlto thelocalfilesystem by @mnapoli in #58499 - Only merge cached casts for accessed attribute by @ug-christoph in #57627
- [12.x] Sort stan issue on PendingRequest by @jackbayliss in #58760
- [12.x] Update alphabetical order in facades.yml by @luisscruza in #58757
- [12.x] allow string-based expressions for selectExpression() by @tpetry in #58753
- Revert "[12.x] Adjust freshTimestamp for SQL Server" by @calebdw in #58758
- [12.x] Fix return empty Collection for non-model JSON:API resources by @noir4y in #58752
- [12.x] Refactor: remove extra space by @alipowerful7 in #58751
- [12.x] Standardize regex delimiter in ObserverMakeCommand::parseModel by @mohammadRezaei1380 in #58777
- [12.x] Fix incorrect @return type in VendorPublishCommand::publishTag by @mohammadRezaei1380 in #58774
- Fix phpdoc type in promptForMissingArgumentsUsing by @billypoke in #58768
- [12.x] cast
Batch::progress()return value tointby @zjbarg in #58767 - [12.x] Drop Collection import from
AbstractRouteCollectionby @jackbayliss in #58769 - [12.x] Fix missing InputArgument::IS_ARRAY in getArguments PHPDoc by @kayw-geek in #58771
- [12.x] Fix:
@returnforresolveResourceRelationshipIdentifiers()by @alipowerful7 in #58764 - [12.x]
Mailable::later()does not set delay onSendQueuedMailableinstance by @amirhshokri in #58765 - [12.x] Refactor: use
enum_value()helper for environment value extraction by @alipowerful7 in #58785 - [12.x] Add delay support assertions for queued mailables by @amirhshokri in #58787
- Fix MySQL connection string to use --ssl-mode=DISABLED for modern clients by @AJenbo in #58786
- [12.x] Refactor: standardize regex by @alipowerful7 in #58789
- [12.x] Allow $preserveKeys param for LazyCollection random by @jackbayliss in #58791
- [12.x] Refactor:
new Collection()by @alipowerful7 in #58793 - [12.x] Add
makeManymethod to Factory by @jackbayliss in #58795 - [12.x] Add
withoutAfterMaking()andwithoutAfterCreating()factory helpers by @ziadoz in #58794 - [12.x] Backport withMiddleware changes from 13.x by @jackbayliss in #58798
- [12.x] Fix: add
|arrayin doc block by @alipowerful7 in #58805 - [12.x] Add option to opt out of parallel safe cache prefix by @jackbayliss in #58801
- [12.x] Normalize Throwable docblocks to fully-qualified name by @amirhshokri in #58802
- [12.x] Refactor: remove unnecessary
\BackedEnumby @alipowerful7 in #58807 - Use atomic writes when creating inline Blade component views by @cyppe in #58815
- [12.x] Add missing tests for Request::fullUrlWithoutQuery by @miladev95 in #58814
- Improve File::toKilobytes() DocBlock return type by @Amirhf1 in #58811
- Use atomic writes in BladeCompiler to prevent race condition by @cyppe in #58812
- [12.x] Refactor: add
JSON decodedby @alipowerful7 in #58830 - [12.x] Refactor: add missing
@throwstag in dock block by @alipowerful7 in #58829 - [12.x] Formatting by @amirhshokri in #58828
- [12x]Refactor: remove unnecessary \BackedEnum in HasAttributes.php by @mohammadRezaei1380 in #58827
- [12x] Refactor conditional message formatting using match expression by @mohammadRezaei1380 in #58825
- [12.x] Refactor: use
matchexpression by @alipowerful7 in #58824 - [12.x] Simplify
compileSelectmethod return by @amirhshokri in #58821 - [12.x] Refactor: simplify code by @alipowerful7 in #58820
- [12.x] Refactor: remove unnecessary
\BackedEnumby @alipowerful7 in #58818 - [12.x] Ensure HttpClientTest doesnt flake in Windows CI by @jackbayliss in #58817
- [12.x] Refactor:
JSON decodedtodecoded JSONby @alipowerful7 in #58849 - [12.x] Allow closure parameters in docblock for when() helper function by @gazben in #58862
- [12.x] Fix typo in cache
composer.jsonby @amirhshokri in #58875 - [12.x] Remove unnecessary
forgetDriver()from TestCaches by @jackbayliss in #58878 - Revert "[12.x] Fixed precision checks for column types in SQL Server grammar" by @taylorotwell in #58888
- [12.x] Display closures and standalone functions correctly in exception trace by @avosalmon in #58879