chore(deps): update dependency phan/phan to v6#159
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
chore(deps): update dependency phan/phan to v6#159renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^5.4→^6.0Release Notes
phan/phan (phan/phan)
v6.0.1: Phan 6.0.1Compare Source
New features:
&before the method name in@methodannotations, to declare that the method returns by reference (#5430)PhanTypeComparisonObjectOrderingissue type to detect when ordering operators (<,<=,>,>=,<=>) are used to compare an object with anon-object value, which throws TypeError in PHP 8.0+
Bug fixes:
array_mapwith ternary expression as array argument (#5424)value-of<T>andkey-of<T>not evaluating to the expected types (#5421)ifstatement vs?:ternary expression (#5408)arraynot being treated as array-like (#5433)Miscellaneous:
v6.0.0: Phan 6.0.0Compare Source
Phan NEWS
Jan 16 2026, Phan 6.0.0
Bug fixes:
PhanUnreferencedClosurebeing emitted too aggressively for closure function parameters (#5389)matchexpression type narrowing when multiple conditional expressions are used (#5398)PhanTypeMismatchArgumentSuperTypefalse positives on closure parameters (#5402)count()- only narrow closed array shapes with optional keys (#5406)IS_PROMOTED_PROPERTYflag detection for constructor property promotion (#5411, #5416)matchdetection with literal bool edge cases (#5388)Improvements:
Method::cloneWithTemplateParameterTypeMapto avoid unnecessary cloningCallableParamPluginfor functions with no parametersFullyQualifiedClassElement::makeusing object IDscomposer-patchespackage location for PHP 8.5 compatibility (#5387)Nov 20 2025, Phan 6.0.0-beta
Breaking changes:
-iCLI option is now an alias of--incrementalinstead of--ignore-undeclaredPhanPluginCanUsePHP71Voidissue toPhanPluginCanUseVoidReturnTypeallow_method_param_type_wideningconfig option (contravariance is now always allowed)backward_compatibility_checksconfig option, along with its respective--backward-compatibility-checksand-bCLI flagsNew features (Analysis):
ast_trim_max_elements_per_level(default 256) andast_trim_max_total_elements(default 512).max_union_type_set_size(default 1024), preventing runaway growth from deeply nested array merges while keeping type inference useful.--ast-trim-max-elements-per-level,--ast-trim-max-total-elements,--max-union-type-set-size) for easy experimentation without editing config files.|>) with full type inference through piped call chains(void)cast support for suppressing NoDiscard warningsnew MyClass()->method())@param,@var, and@return@param,@var, and@returnannotations before analysis, allowing nested array/generic syntax to be laid out
across several lines without being misinterpreted.
@phan-param,@phan-var,@phan-return,@phan-real-return,@phan-property*,@phan-assert,@phan-type,@phan-implements,@phan-extends,@phan-inherits,@phan-use(#4252)PHPDocRedundantPluginnow flags redundant@varannotations on typedproperties, matching its existing coverage for functions and methods.
PreferNamespaceUsePluginnow handles union types!in_array()checks (#5185)$var2 =& $var1) now have their literal types erasedarray_filter()recognizes null-stripping callbacks and keeps element types non-null (#5100)array_chunk()return type inference based onpreserve_keysparameter (#5165)constant()return type inference from Phan's constant table for non-dynamic constants (#5157)foreachiterator type inference honoring explicit iterator generics (#5108)self::CASE->value+=,-=, etc.)@vardocblocks on typed propertiesNew features (CLI):
.phan/config.php--subdirectory-onlyflag for analyzing specific modules with better performance-n/--no-config-fileimplicitly limits analysis to just the files providedon the command line (e.g.
phan -n test1.php test2.php) avoiding analysis ofthe rest of the project when you only want quick ad-hoc checks.
will be analyzed on subsequent runs. Significantly speeds up re-analysis.
--incremental/-ioption that enables incremental analysis.--force-full-analysisflag to force a full re-analysis of all files, ignoring the incremental analysis manifest.--no-incremental/-Noption that disables incremental analysis (useful if it was enabled in config.php).Performance improvements:
New features (Tools):
tool/add_suppressions.phpto assist in adding@suppressor@phan-suppressannotations to filestool/SuppressionsToolImplementation.mdfor technical detailsBug fixes:
Type Inference & Analysis:
!empty()condition on arrays (#5295)PhanAccessReadOnlyPropertyMultipleTimesfailing to account for mutually exclusive branches (#5285)declareblocks causing Phan to lose track of declared variables (#5284)PhanTemplateTypeConstraintViolationwhen type can't be resolved (#5282)is_objectand!is_arraychecks with mixed types (#5277)is_null()and!is_null()(#5277)PhanPossiblyUndeclaredVariablewith function calls and following usage (#5269)PhanTypeMismatchGeneratorYieldKeyfalse positive when yield has no key (#5258)PhanAccessOwnConstructorincorrectly warning on valid usage ofself::__construct(#5257)isset()andempty()warning on undefined properties (now only warns on direct access and unset) (#5273)array_combinesignature being too strict for null values (#5219)get_class()to return more specific class-string types (#5274)getIterator()returning Iterator with explicit generics (#5108)@require-extends/@require-implements(and their Psalm aliases) to ensure consuming classes satisfy those requirementsPhanPossiblyInfiniteRecursionSameParamsfalse positive for instance methods that guard recursion with property state (#5371)PhanTypeMismatchDeclaredConstantfalse positives for enum cases whose values are strings/ints (#5378)Tooling:
--save-baselinenow store suppressions per symbol (class/method/function) instead of line numbers and normalize anonymous class/closure names, so suppressions remain stable when code moves or hashes change (#5381/#5383)Plugins:
PhanSuspiciousValueComparisonmessage when all literal possibilities exhausted (#5276)PhanCommentAbstractOnInheritance(#5265)Other Fixes:
?->(#5112)%operator (#5189)define()(#5156)EmptyFQSENExceptionwith--analyze-twice(#5086)PhanTypeMismatchDeclaredReturnwith template types (#5181)isset()on readonly properties in@phan-side-effect-freeclasses (#5180)PhanParamTooFewUnpackwith array_map (#5114)parent::/static::(#5109)PHPDoc & Attributes:
__calland__callStaticfrom automatic inheritance (#5124)Plugin Fixes:
array{}|non-empty-array<K,V>(#5187)Loop & Control Flow:
!isset()variable tracking: Possibly-undefined flag preservation now works correctly (#5172)empty(): Proper static property handling (#5148)AST Compatibility:
clonebeing incorrectly treated as a function call in AST version 110+ (it's now AST_CALL instead of AST_CLONE)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.