Skip to content

7.10.0

Latest

Choose a tag to compare

@github-actions github-actions released this 18 Nov 00:45
2d8a48d

What's Changed

Features

  • Array offsets: Report a false offset, which PHP turns into 0 by @jirkace in #12690
  • CLI: Add --min-type-coverage to fail below a type coverage minimum by @alies-dev in #14075
  • Language server: Apply the baseline as the CLI does by @alies-dev in #13775

Fixes

  • Docblock types: Recognize non-empty-scalar and similar types in namespaces by @orklah in #14079
  • Docblock types: empty-scalar and non-empty-scalar no longer accept any scalar by @orklah in #14080
  • Language server: Reject unrecognised short options by @jay23606 in #13763
  • Loops: Report definite issues of a do-while's first iteration, not Possibly* by @orklah in #14032
  • Loops: Report an argument issue once, not once per loop pass by @orklah in #14103
  • Loops: Propagate types through nested foreach and references by @orklah in #14099
  • Mixed: Keep a mixed variable mixed after an if that wrote its offsets by @orklah in #14039
  • Mixed: Keep a mixed variable mixed after else, switch, match and || by @orklah in #14063
  • Mixed: Fix false PossiblyUndefinedVariable after isset($var[$k]) by @orklah in #14065
  • Mixed: Fix false InvalidArrayOffset on nested writes by @orklah in #14062
  • Named arguments: Report the right argument number by @orklah in #14096
  • Narrowing: Narrow impossible null comparisons to never by @orklah in #14036
  • Narrowing: Narrow exhaustive instanceof checks to never by @orklah in #14048
  • Narrowing: Fix false contradictions on === between overlapping types by @orklah in #14037
  • Narrowing: class_exists() narrows only inside its if block by @jirkace in #13391
  • Narrowing: $a?->m() ?? false narrows $a to non-null by @jirkace in #12995
  • Narrowing: Narrow variables bound by reference in conditions by @orklah in #14101
  • Property hooks: Fix __METHOD__ and false LessSpecificReturnType by @danog in #14066
  • PHP 8.6: Allow #[\Override] on class constants and enum cases by @alies-dev in #14038
  • Plugins: Resolve class names in all type declarations of the AST by @alies-dev in #14134
  • Properties: Forget property items a called method writes by @orklah in #14027
  • Purity: Account for implicit __toString() calls by @shu-chen-dot-ca in #13782
  • Stubs: filter_var(null) returns '' by @orklah in #14124
  • Stubs: libxml_set_external_entity_loader() is not an unused call by @alies-dev in #14118
  • Stubs: pathinfo() may omit dirname by @orklah in #14122
  • Stubs: Fix write-only by-reference params of proc_open() and others by @orklah in #14100
  • Stubs: Fix SplObjectStorage value checks and param names by @orklah in #14121
  • Stubs: stream_get_meta_data() keys may be undefined by @orklah in #14095
  • Templates: Narrow key-of<T>/value-of<T> instead of reporting contradictions by @orklah in #14041
  • Templates: Use the bound of key-of<T>/value-of<T> in operations by @orklah in #14064
  • Templates: Narrow to key-of<T>/value-of<T> after array_key_exists()/in_array() by @orklah in #14034
  • Templates: Keep string in an array|scalar argument to a string|array template by @orklah in #14098
  • Templates: Report a type conflict at the write that causes it by @orklah in #14102
  • Type coverage: Don't count deleted files on cached runs by @alies-dev in #14077

Internal changes

  • Self-analysis: Fix ComplexMethod on IfElseAnalyzer::analyze() by @orklah in #14088
  • Tests: Cover unset() of an offset in an isset() branch by @jirkace in #13123

New Contributors

Full Changelog: 7.9.0...7.10.0