New features(CLI, Configs):
- Add more detailed instructions for installing dependencies new php installations on Windows without a php.ini
- Handle being installed in a non-standard composer directory name (i.e. not
vendor
) (mentioned in #1612)
New Features(Analysis):
- Improve inferred array shapes for multi-dimensional assignments or conditions on arrays
(e.g.$x['first']['second'] = expr
orif (cond($x['first']['second']))
) (#1510, #3569) - Infer that array offsets are no longer possibly undefined after conditions such as
if (!is_null($x['offset']))
- Improve worst-case runtime when merging union types with many types (#3587)
- Improve analysis of assignment operators. (#3597)
- Infer
$x op= expr
and++
/--
operators have a literal value when possible, outside of loops. (#3250, #3248) - Move
PhanUndeclaredInterface
andPhanUndeclaredTrait
warnings to the line number of theuse
/implements
. (#2159) - Don't emit
PhanUndeclaredGlobalVariable
for the left side of??
/??=
in the global scope (#3601) - More consistently infer that variables are possibly undefined if they are not defined in all branches. (#1345, #1942)
- Add new issue types for possibly undeclared variables:
PhanPossiblyUndeclaredVariable
andPhanPossiblyUndeclaredGlobalVariable
.
Plugins:
- Add
StrictLiteralComparisonPlugin
to warn about loose equality comparisons of constant string/int to other values. (#2310)