You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Properly render the default values if available(ReflectionParameter->isDefaultValueAvailable()) in php 8.0+.
Properly set the real union types based on reflection information for functions/methods in more edge cases.
Properly infer that union types containing the empty array shape are possibly empty after sorting (#3980)
Infer a more accurate real type set from unary ops ~, +, and - (#3991)
Improve ability to infer assignments within true branch of complex expressions in conditions such as if (A && complex_expression) { } else { } (#3992)
Plugins:
Add ShortArrayPlugin, to suggest using [] instead of array() or list()
In DuplicateExpressionPlugin, emit PhanPluginDuplicateExpressionAssignmentOperation if X = X op Y is seen and it can be converted to X op= Y (#3985)
(excluding ??= for now)
Add SimplifyExpressionPlugin, to suggest shortening expressions such as $realBool ? true : false or $realBool === false
Add RemoveDebugStatementPlugin, to suggest removing debugging output statements such as echo, print, printf, fwrite(STDERR, ...), var_export(...), inline html, etc.
This is only useful in applications or libraries that print output in only a few places, as a sanity check that debugging statements are not accidentally left in code.
Bug fixes:
Treat @method static foo() as an instance method returning the union type static (#3981)
Previously, Phan treated it like a static method with type void based on an earlier phpdoc spec.
Fix the way that Phan inferred the finally block's exit status affected the try block. (#3987)