Laravel 12.2.0
13 March 2025
Laravel version 12.2.0 is now available (major release).
What's New in Laravel 12.2.0
12.2.0
Bug Fixes and Changes
- Add dates to allowed PHPDoc types of Builder::having() by @miken32 in #54899
- Fix double negative in whereNotMorphedTo() query by @owenvoke in #54902
- Add test for Arr::partition by @liamduckett in #54913
- Expose process checkTimeout method by @mattmcdev in #54912
- Compilable for Validation Contract by @peterfox in #54882
- Backport "Change paginate() method return types to \Illuminate\Pagination\LengthAwarePaginator" by @carestad in #54917
- Revert faulty change to EnumeratesValues::ensure() doc block by @axlon in #54919
- Ensure ValidationEmailRuleTest skips tests requiring the intl extension when unavailable by @alikhosravidev in #54918
- Ensure Enum validation is case-sensitive by adding a new test case. by @alikhosravidev in #54922
- Feature: Collection chunk without preserving keys by @liamduckett in #54916
- Add test coverage for Uri::withQueryIfMissing method by @mohammadrasoulasghari in #54923
- Fix issue with using RedisCluster with compression or serialization by @rzv-me in #54934
- Add test coverage for Str::replaceMatches method by @mohammadrasoulasghari in #54930
- Types: Collection chunk without preserving keys by @liamduckett in #54924
- Add ddBody method to TestResponse for dumping various response payloads by @Sammyjo20 in #54933
- Backport "Fix issue with using RedisCluster with compression or serialization" by @rzv-me in #54935
- feat: add CanBeOneOfMany support to HasOneThrough by @calebdw in #54759
- Hotfix - Add function_exists check to ddBody in TestResponse by @Sammyjo20 in #54937
- Refactor: Remove unnecessary variables in Str class methods by @mohammadrasoulasghari in #54963
- Add Tests for Str::pluralPascal Method by @mohammadrasoulasghari in #54957
- Fix visibility of setUp and tearDown in tests by @naopusyu in #54950
- Test Improvements by @crynobone in #54944
- Fix missing return in assertOnlyInvalid by @parth391 in #54941
- Handle case when migrate:install command is called and table exists by @joe-tito in #54938
- Fix callOnce in Seeder so it handles arrays properly by @lbovit in #54985
- Change "exceptoin" spelling mistake to "exception" by @hvlucas in #54979
- Add test for after method in LazyCollection by @mohammadrasoulasghari in #54978
- Add increment and decrement methods to Context by @mattmcdev in #54976
- Ensure ExcludeIf correctly rejects a null value as an invalid condition by @alikhosravidev in #54973
- apply Pint rule "no_spaces_around_offset" by @browner12 in #54970
- apply Pint rule "single_line_comment_style" by @browner12 in #54969
- do not use mix of newline and inline formatting by @browner12 in #54967
- use single indent for multiline ternaries by @browner12 in #54971
12.1.1
Bug Fixes and Changes
- Add valid values to ensure method by @lancepioch in #54840
- Fix attribute name used on Validator instance within certain rule classes by @crynobone in #54845
- Fix Application::interBasePath() fails to resolve application when project name is "vendor" by @crynobone in #54871
- Test improvements by @crynobone in #54879
- DocBlock: Changed typehint for Arr::partition method by @AndrewMast in #54896
- Enhance Email and Image Dimensions Validation Tests by @alikhosravidev in #54897
- Apply default styling rules to the notification stub by @ahinkle in #54895
12.1.0
Bug Fixes and Changes
- Test Improvements by @crynobone in #54782
- Fix incorrect typehints in BuildsWhereDateClauses traits by @mohprilaksono in #54784
- Improve queries readablility by @hafezdivandari in #54791
- Enhance eventStream to Support Custom Events and Start Messages by @devhammed in #54776
- Make the PendingCommand class tappable. by @kevinb1989 in #54801
- Add missing union type in event stream docblock by @devhammed in #54800
- Change return types of paginage() methods to \Illuminate\Pagination\LengthAwarePaginator by @carestad in #54826
- Check if internal Hasher::verifyConfiguration() method exists on driver before forwarding call by @rodrigopedra in #54833
- Fix using AsStringable cast on Notifiable's key by @crynobone in #54818
- Add Tests for Handling Null Primary Keys and Special Values in Unique Validation Rule by @alikhosravidev in #54823
- Improve docblock for with() method to clarify it adds to existing eag… by @igorlealantunes in #54838
- Fix dropping schema-qualified prefixed tables by @hafezdivandari in #54834
- Add Context::scope() by @cosmastech in #54799
- Allow Http requests to be recorded without requests being faked by @kemp in #54850
- Adds a new method "getRawSql" (with embedded bindings) to the QueryException class by @erickcomp in #54849
- Update Inspiring.php by @ju-gow in #54846
- Correct use of named argument in Date facade and fix a return type. by @lmottasin in #54847
- Add additional tests for Rule::array validation scenarios by @alikhosravidev in #54844
- Remove return statement by @mohprilaksono in #54842
- Fix typos by @co63oc in #54839
- Do not loop through middleware when excluded is empty by @cosmastech in #54837
- Add test for Arr::reject method in Illuminate Support by @mohammadrasoulasghari in #54863
- Feature: Array partition by @liamduckett in #54859
- Introduce ContextLogProcessor by @cosmastech in #54851