Laravel 12.46.0 Released: New Array Helpers, Collection Enhancements & MySQL DDL Locking Explained
In Laravel 12.46.0, the framework gains value-based array helpers, a new collection convenience method, safer container typing for static analysis tools, and more robust database behavior through table prefix and MySQL DDL locking improvements.
Laravel 12.46.0 has been released on 8th January 2026, which is a small feature & fixes release focusing on collection/array helpers and database/MySQL behavior.
New helper methods
- Arr::onlyValues(array $array, array $values): Returns a new array containing only entries whose values are in the given list (value-based filter instead of key-based). Useful when you know allowed values but not keys.
- Arr::exceptValues(array $array, array $values): Opposite of above; removes entries whose values are in the provided list.
- Collection::containsManyItems(array $items): New method to check if a collection contains multiple given items, useful for more expressive condition checks on collections.
Container and static analysis
- Fixed phpdoc for Container::buildSelfBuildingInstance to align with actual return types and behavior, preventing Psalm from reporting parsing or type errors on the class.
Database and MySQL changes
- Fixed an issue where table prefixes were not applied when cloning database connections, ensuring consistent prefix behavior across cloned connections (e.g., multi-tenant or dynamic connection setups).
- Added MySQL DDL locking options to the MySQL grammar, enabling you to control locking behavior on schema changes via migrations (e.g., fine-tuning online schema changes and lock strategies).
The complete changelog can be found below. For more details, click here
- [12.x] Add
Arr::onlyValuesandArr::exceptValuesby @stevebauman in #58317 - [12.x] Fixed phpdoc of
Container::buildSelfBuildingInstance, to prevent Psalm from erroring when parsing the class by @nicDamours in #58314 - [12.x] Add
Collection::containsManyItems()method by @stevebauman in #58312 - [12.x] Table prefix not applied when cloning connections by @dxnter in #58288
- [12.x] Added MySQL DDL locking options to MySQL grammar by @Vladelis in #58293
Join the conversation
What do you think?
Write a comment
No comments yet. Be the first to share a thought.