Laravel 12.4.0
4 April 2025
Laravel version 12.4.0 is now available (major release).
What's New in Laravel 12.4.0
12.4.0
Bug Fixes and Changes
- Reset PHP’s peak memory usage when resetting scope for queue worker by @TimWolla in #55069
 
- Add AsHtmlString cast by @ralphjsmit in #55071
 
- Add Arr::sole() method by @ralphjsmit in #55070
 
- Improve warning message in ApiInstallCommand by @sajjadhossainshohag in #55081
 
- use already determined related property by @browner12 in #55075
 
- use "class-string" where appropriate in relations by @browner12 in #55074
 
- QueueFake::listenersPushed() by @cosmastech in #55063
 
- Added except() method to Model class for excluding attributes by @vishal2931 in #55072
 
- fix: add TPivotModel default and define pivot property in {Belongs,Morph}ToMany by @calebdw in #55086
 
- remove @return docblocks on constructors by @browner12 in #55076
 
- Add NamedScope attribute by @shaedrich in #54450
 
- Improve syntax highlighting for stub type files by @kayw-geek in #55094
 
- Prefer new Collection over Collection::make by @AhmedAlaa4611 in #55091
 
- Fix except() method to support casted values by @vishal2931 in #55124
 
- Add testcase for findSole method by @mrvipchien in #55115
 
- Types: PasswordBroker::reset by @liamduckett in #55109
 
- assertThrowsNothing by @gdebrauwer in #55100
 
- Fix type nullability on PasswordBroker.events property by @jnoordsij in #55097
 
- Fix return type annotation in decrementPendingJobs method by @shane-zeng in #55133
 
- Fix return type annotation in compile method by @shane-zeng in #55132
 
- feat: Add whereNull and whereNotNull to Assertablejson by @faissaloux in #55131
 
- fix: use contextual bindings in class dependency resolution by @calebdw in #55090
 
- Better return types for Illuminate\Queue\Jobs\Job::getJobId() and Illuminate\Queue\Jobs\DatabaseJob::getJobId() methods by @petrknap in #55138
 
- Remove remaining @return tags from constructors by @mohammadrasoulasghari in #55136
 
- Various URL generation bugfixes by @stancl in #54811
 
- Add an optional shouldRun method to migrations. by @danmatthews in #55011
 
- Uri prevent empty query string by @rojtjo in #55146
 
- Only call the ob_flush function if there is active buffer in eventStream by @tonysm in #55141
 
- Add CacheFlushed Event by @tech-wolf-tw in #55142
 
- Update DateFactory method annotations for Carbon v3 compatibility by @kayw-geek in #55151
 
- Improve docblocks for file related methods of InteractsWithInput by @SanderMuller in #55156
 
- Enhance FileViewFinder doc-blocks by @imanghafoori1 in #55183
 
- Support using null-safe operator with null value by @willrowe in #55175
 
- Fix: Make Paginated Queries Consistent Across Pages by @tomchkk in #55176
 
- Add pipe method query builders by @timacdonald in #55171
 
- fix: one of many subquery constraints by @calebdw in #55168
 
- fix(postgres): missing parentheses in whereDate/whereTime for json columns by @saibotk in #55159
 
- Fix factory creation through attributes by @davidstoker in #55190
 
- Fix Concurrency::run to preserve callback result order by @chaker2710 in #55161
 
- Log: Add optional keys parameter to Log::withoutContext to remove selected context from future logs by @mattroylloyd in #55181
 
- Add Expression type to param $value of QueryBuilder having() method by @faissaloux in #55200
 
- Add flag to disable where clauses for withAttributes method on Eloquent Builder by @AndrewMast in #55199
 
12.3.0
Bug Fixes and Changes
- fixes laravel/octane#1010 by @mihaileu in #55008
 
- Added the missing 'trashed' event to getObservablesEvents() by @duemti in #55004
 
- Enhance PHPDoc for Manager classes with @param-closure-this by @kayw-geek in #55002
 
- Fix PendingRequest typehints for post, patch, put, delete by @cosmastech in #54998
 
- Add test for untested methods in LazyCollection by @mohammadrasoulasghari in #54996
 
- fix indentation by @browner12 in #54995
 
- apply final Pint fixes by @browner12 in #55014
 
- Enhance validation tests: Add test for connection name detection in Unique rule by @alikhosravidev in #54993
 
- Add json:unicode cast to support JSON_UNESCAPED_UNICODE encoding by @fuwasegu in #54992
 
- Add “Storage Linked” to the about command by @adampatterson in #54949
 
- Add support for native JSON/JSONB column types in SQLite Schema builder by @fuwasegu in #54991
 
- Fix LogManager::configurationFor() typehint by @cosmastech in #55016
 
- Add missing tests for LazyCollection methods by @mohammadrasoulasghari in #55022
 
- Refactor: Structural improvement for clarity by @AhmedAlaa4611 in #55018
 
- Improve toKilobytes to handle spaces and case-insensitive units by @alikhosravidev in #55019
 
- Fix mistake in asJson call in HasAttributes.php that was recently introduced by @AndrewMast in #55017
 
- reapply Pint style changes by @browner12 in #55015
 
- Add validation test for forEach with null and empty array values by @alikhosravidev in #55047
 
- Types: EnumeratesValues Sum by @liamduckett in #55044
 
- Ensure Consistent Formatting in Generated Invokable Classes by @AhmedAlaa4611 in #55034
 
- Add element type to return array in Filesystem by @AJenbo in #55031
 
- Add support for PostgreSQL "unique nulls not distinct" by @thierry2015 in #55025
 
- standardize multiline ternaries by @browner12 in #55056
 
- improved readability for aliasedPivotColumns by @browner12 in #55055
 
- remove progress bar from PHPStan output by @browner12 in #55054
 
- Fixes how the fluent Date rule builder handles date_format by @AndrewMast in #55052
 
- Adding SSL encryption and support for MySQL connection by @mdiktushar in #55048
 
- Revert "Adding SSL encryption and support for MySQL connection" by @taylorotwell in #55057
 
- Ensure queue property is nullable by @timacdonald in #55058
 
- return $this for chaining by @browner12 in #55060
 
- prefer new Collection over collect() by @browner12 in #55059
 
- use "class-string" type for using pivot model by @browner12 in #55053
 
- multiline chaining on Collections by @browner12 in #55061