laravel-ide-helper
laravel-ide-helper copied to clipboard
Fix return type of methods provided by `SoftDeletes`
Summary
Fix return type of methods provided by SoftDeletes.
Detail
The SoftDeletes model has three methods available:
As the linked code shows, they return \Illuminate\Database\Eloquent\Builder, but theide-helper:models command generates the annotation \Illuminate\Database\Query\Builder. I fixed this difference.
Notice
Previously there were no issues, but with the fix for Laravel v9.3.0 , some static analysis tools such as PHPStan now report errors in the traditional ide-helper process.
Type of change
- [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist
- [x] Existing tests have been adapted and/or new tests have been added
- [x] Add a CHANGELOG.md entry
- [ ] Update the README.md
- [x] Code style has been fixed via
composer fix-style
Makes sense I think, not sure why originally it was Query, maybe @max-matiukhin remembers? :)
@barryvdh @mfn Thank you for review and merge!