What's Changed
Deep relationship type resolution, Custom query builders, Custom Collections, and smarter validation shapes (thanks to @MDG11).
Custom Query Builders
- Infer custom query builder types via
#[UseEloquentBuilder]attribute andnewEloquentBuilder()override (#621) @alies-dev - Resolve scope methods on custom query builder instances (#633) @alies-dev
- Support
SoftDeletestrait methods on custom query builders (#632) @alies-dev
Relationships
- Add
MethodForwardingHandlerfor Relation method forwarding (#642) @alies-dev - Resolve
morphToproperty type from docblock generic annotations (#652) @alies-dev - Resolve custom collection types for relation property access (#651) @alies-dev
- Support
#[CollectedBy]attribute for custom Eloquent collections (#623) @alies-dev
Validation
- Parse dot-notation validation rules into nested array shapes (#625) @MDG11 and @alies-dev
Type Improvements
- Narrow
Collection::flatten()andcollapse()return types to preserveTValue(#619) @alies-dev - Redeclare
Model::increment()/decrement()as public in stub (#618) @alies-dev - Skip
ModelMakeDiscouragedwhen model has custommake()method (#616) @alies-dev
Security (Taint Analysis)
- 🛡️ Add
@psalm-flowfor Collectionget()/first()/pull()/value()default parameter taint propagation (#650) @alies-dev
Internal
- Replace GNU time with hyperfine + github-action-benchmark (#657) @alies-dev
- Add CI performance benchmark workflow (#655) @alies-dev
New Contributors
Full Changelog: v4.5.0...v4.6.0