phan v3.0.2 Release Notes
Release Date: 2020-06-07 // almost 4 years ago-
🆕 New features(CLI, Configs):
- ➕ Add
--dead-code-detection-prefer-false-positive
to run dead code detection,
erring on the side of reporting potentially dead code even when it is possibly not dead.
(e.g. when methods of unknown objects are invoked, don't mark all methods with the same name as potentially used)
🆕 New features(Analysis):
- 🛠 Fix false positive
PhanAbstractStaticMethodCall
(#3935)
Also, properly emitPhanAbstractStaticMethodCall
for a variable containing a string class name.
🔌 Plugins:
- 🛠 Fix incorrect check and suggestion for
PregRegexCheckerPlugin
's warning if
🔧$
allows an optional newline before the end of the string when the configuration includes
['plugin_config' => ['regex_warn_if_newline_allowed_at_end' => true]]
) (#3938) - ➕ Add
BeforeLoopBodyAnalysisCapability
for plugins to analyze loop conditions before the body (#3936) - Warn about suspicious param order for
str_contains
,str_ends_with
, andstr_starts_with
inSuspiciousParamOrderPlugin
(#3934)
🐛 Bug fixes:
- Don't report unreferenced class properties of internal stub files during dead code detection
(i.e. files inautoload_internal_extension_signatures
). - 🚚 Don't remove the leading directory separator when attempting to convert a file outside the project to a relative path.
(in cases where the directory is different but has the project's name as a prefix)
- ➕ Add