v4.14.0 - π+1
What's Changed
v4.14.0 spans Eloquent type inference and security: three new security detectors, relationship and filesystem narrowing, paginator fixes, and an opt-in query-builder best-practice rule.
Security 🛡️
- Detect user-controlled container resolution as unsafe reflection (CWE-470) (#1075)
- Detect timing-unsafe comparisons of secrets (CWE-208) (#1013)
- Add
html_urltaint kind for URL-context XSS distinct frome()(#1014)
Best Practices ⭐️
- Add opt-in
ImplicitQueryBuilderCallrule for direct model query and scope calls. It requires writingUser::query()->where(...)instead ofUser::where(...)(#1068)
Relationships
- Fix
MissingTemplateParamon in-bodybelongsToMany()/morphToMany()pivot chains (#1090) - Fix
mixedcollapse when chaining off relation methods, by replacing$thiswithstaticin generic templates and using@template-covariantfor relationships (#1055)
Filesystem
- Narrow
Storage::disk()toFilesystemAdaptersotemporaryUrl()andurl()resolve (#1093) - Narrow
FilesystemAdapterlisting methods tolist<string>(#1094)
Forms
- Narrow
FormRequestmagic property reads ($request->fieldcalls) (#1022)
Other Features and Fixes
- Infer
app(Foo::class)asFoowhen the booted app cannot resolve it (Laravel packages) (#1076) - Fix false-positive
UndefinedMethodon$app->when()->needs()chains (#1077) - Narrow
when()/unless()callback return types (#997) - Return the concrete paginator from
paginate()and preserve the related-model template through relations (#1082) - Suppress false
PossiblyUnusedMethodon Eloquent trait boot/initialize hooks (#1080)
Internal changes
- Raise minimum Laravel to
^12.4(#1089) - CI: add a new
/psalm-deltaworkflow to benchmark the plugin over real apps and libraries (#1079, #1086, #1084)
Full Changelog: v4.13.2...v4.14.0