What's Changed
Fixed
- Preserve collection key types in Eloquent queries and paginators, with an optional key type in
collection-of, by @canvural in 397c6df. Read more about it here. - Infer
chunk()andeach()callback types onBelongsToManyand through relations, including pivot types, by @canvural in 726e7a8 - Check model properties in
forceCreateQuietly()by @midhunmonachan in #2558 - Check model properties in quiet and force relation create methods by @Cayan in #2560
- Accept
save()options such astouchinstead of model properties by @Cayan in #2561 - Resolve config keys using paths relative to their config directory and expand glob patterns in
configDirectoriesby @canvural in f9b491b, fe7154b - Preserve the config value type when a default is passed to
config()by @canvural in f2a79f7 - Preserve
$thisinwhere()and global scope methods on Eloquent builders by @SanderMuller in #2567 - Prevent index methods from overwriting or creating migration columns by @Cayan in #2566
- Refine Laravel API types for events, query logs, migrations, mail, notifications, routing, and reflection by @canvural in 8fc1821
- Resolve class constants used as migration column names by @Cayan in #2565
- Accept numeric strings, integers, and floats when writing decimal casts by @matical in #2570
- Infer named guard types from their configured driver by @antoinelame in #2571
Performance
- Cache object types in helper extensions and builder names in
BuilderHelperby @haratake22 in #2553 - Load migrations only once when no tables are found by @ryanshepherd in #2569
New Contributors
- @midhunmonachan made their first contribution in #2558
- @Cayan made their first contribution in #2560
- @ryanshepherd made their first contribution in #2569
- @SanderMuller made their first contribution in #2567
- @matical made their first contribution in #2570
- @antoinelame made their first contribution in #2571
Full Changelog: v3.12.2...v3.12.3