Repository navigation
What's Changed
Features
- Array offsets: Report a
falseoffset, which PHP turns into0by @jirkace in #12690 - CLI: Add
--min-type-coverageto 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-scalarand similar types in namespaces by @orklah in #14079 - Docblock types:
empty-scalarandnon-empty-scalarno 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, notPossibly*by @orklah in #14032 - Loops: Report an argument issue once, not once per loop pass by @orklah in #14103
- Loops: Propagate types through nested
foreachand references by @orklah in #14099 - Mixed: Keep a
mixedvariablemixedafter anifthat wrote its offsets by @orklah in #14039 - Mixed: Keep a
mixedvariablemixedafterelse,switch,matchand||by @orklah in #14063 - Mixed: Fix false
PossiblyUndefinedVariableafterisset($var[$k])by @orklah in #14065 - Mixed: Fix false
InvalidArrayOffseton nested writes by @orklah in #14062 - Named arguments: Report the right argument number by @orklah in #14096
- Narrowing: Narrow impossible
nullcomparisons toneverby @orklah in #14036 - Narrowing: Narrow exhaustive
instanceofchecks toneverby @orklah in #14048 - Narrowing: Fix false contradictions on
===between overlapping types by @orklah in #14037 - Narrowing:
class_exists()narrows only inside itsifblock by @jirkace in #13391 - Narrowing:
$a?->m() ?? falsenarrows$ato non-null by @jirkace in #12995 - Narrowing: Narrow variables bound by reference in conditions by @orklah in #14101
- Property hooks: Fix
__METHOD__and falseLessSpecificReturnTypeby @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 omitdirnameby @orklah in #14122 - Stubs: Fix write-only by-reference params of
proc_open()and others by @orklah in #14100 - Stubs: Fix
SplObjectStoragevalue 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>afterarray_key_exists()/in_array()by @orklah in #14034 - Templates: Keep
stringin anarray|scalarargument to astring|arraytemplate 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
ComplexMethodonIfElseAnalyzer::analyze()by @orklah in #14088 - Tests: Cover
unset()of an offset in anisset()branch by @jirkace in #13123
New Contributors
Full Changelog: 7.9.0...7.10.0