New features(Analysis):
- Emit
PhanTypeInvalidCallExpressionAssignment
when improperly assigning to a function/method's result (or a dimension of that result) (#3455) - Fix an edge case parsing
(0)::class
with the polyfill. (#3454) - Emit
PhanTypeInvalidDimOffset
for accessing any dimension on an empty string or an empty array. (#3385) - Warn about invalid string literal offsets such as
'str'[3]
,'str'[-4]
, etc. (#3385) - Infer that arrays are non-empty and support array access from
isset($x[$offset])
(#3463) - Make
array_key_exists
imply argument is anon-empty-array
(or anobject
). (#3465, #3469) - Make
isset($x[$offset])
imply argument is anon-empty-array
,object
, orstring
Makeisset($x['literal string'])
imply argument is anon-empty-array
orobject
, and not astring
. - Make
isset($x->prop)
imply$x
is anobject
. - Make
isset($this->prop[$x])
imply$this->prop
is not the empty array shape. (#3467) - Improve worst-case time of deduplicating unique types in a union type (#3477, suggested in #3475)
Maintenance:
- Update function signature maps for internal signatures.
Bug fixes:
- Fix false positive
PhanSuspiciousWeakTypeComparison
forin_array
/array_search
/array_key_exists
with function arguments defaulting to[]