Features
- Star projection
Foo<*>: Kotlin's syntax for a generic argument you don't know. Reads go through the template's bound (Box<*>::get()isobjectforT of object), writes through it expectnever, andBox<*>accepts anyBox. See Star projection. (#13139, #13493, #14619, #14598, @alies-dev)
Performance
- Scan workers send back only the stubs they added: −9 % wall, −14 % memory on a large Laravel app (8 threads, no cache). (#12558, @alies-dev)
- Usage-inferred parameter types are recorded only for methods in the project directories: −8 to −15 % wall on apps that analyse their tests (one thread). (#13901, @alies-dev)
- No exponential clause growth in
||chains ofstr_starts_with(). Important for WordPress projects (#14653, @alies-dev) - Config loading skips directories a
**entry already matched: 60 to 85 % faster with**/vendor-style entries. (#14624, @alies-dev) - A class docblock is split into lines once for all its
@methodtags: scanning up to 5 % faster on classes with hundreds of them, such as AWS SDK clients and Laravel Facades. (#14620, @alies-dev)
Fixes
Templates
- An inherited property or callable resolves the parent's template through what the child passes to it (
@extends Base<list<U>>,@extends Base<Box<TModel>>, also across two@extendslevels). (#14487 @jirkace, #14558 @alies-dev) - Callables of a non-generic child of a generic class bind the parent's template. (#14578, @alies-dev)
newon a@template-covariantclass infersneverfor a template nothing can constrain, sonew Coll()fitsColl<int>. (#14449, @jirkace)
Callables and invokable objects
- An intersection whose later member has
__invokeis callable. (#14610, @alies-dev) array_map()with an invokable object as the callback infers the return type of__invokeinstead oflist<mixed>. (#14654, @alies-dev)- An invokable object, a function name or an array passed where a
Closureis expected is anArgumentTypeCoercion, not anInvalidArgument. (#14657, @alies-dev)
Other
--find-references-tofinds the calls of a function. (#14648, @jirkace)- A crashing worker says which file it was processing. (#14651, @jirkace)
- A failing worker pool task (e.g. a plugin hook throwing in a scan worker) is reported once, not again as an unhandled future. (#14595, @alies-dev)
Docs
Internal changes
- CI: Shared duplicated code and dropped dead code. (#14553, @orklah)
- CI: Perf bot: issues changed in place are shown as diffs, a regression warns at +10 % wall per project and +5 % in total, WordPress joins the corpus, and PRs that touch only tests or CI are skipped. (#14568, #14575, #14655, #14656, @alies-dev)
Full Changelog: 7.15.0...7.16.0