Skip to content

7.16.0 Star projection

Latest

Choose a tag to compare

@alies-dev alies-dev released this 22 Nov 13:17
· 2 commits to master since this release
708bf98

Features

  • Star projection Foo<*>: Kotlin's syntax for a generic argument you don't know. Reads go through the template's bound (Box<*>::get() is object for T of object), writes through it expect never, and Box<*> accepts any Box. 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 of str_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 @method tags: 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 @extends levels). (#14487 @jirkace, #14558 @alies-dev)
  • Callables of a non-generic child of a generic class bind the parent's template. (#14578, @alies-dev)
  • new on a @template-covariant class infers never for a template nothing can constrain, so new Coll() fits Coll<int>. (#14449, @jirkace)

Callables and invokable objects

  • An intersection whose later member has __invoke is callable. (#14610, @alies-dev)
  • array_map() with an invokable object as the callback infers the return type of __invoke instead of list<mixed>. (#14654, @alies-dev)
  • An invokable object, a function name or an array passed where a Closure is expected is an ArgumentTypeCoercion, not an InvalidArgument. (#14657, @alies-dev)

Other

  • --find-references-to finds 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

  • Docs examples are self-contained and declare the config they need. (#14585, @danog)

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