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
{{ message }}
Repository navigation
PHP: 8.1 enum cases are dropped (no case_of edges) #4022
A PHP 8.1 enum captures its type and methods but drops all of its cases, leaving the enum a caseless leaf.
Repro
<?phpenum Suit: string {
case Hearts = 'H';
case Spades = 'S';
publicfunctioncolor(): string { return'x'; }
}
The graph has Suit, Suit::color(), but no Hearts/Spades nodes and no case_of edges.
Cause
enum_declaration is in the PHP class_types, so the type and its methods are walked, but the cases nest in the enum_declaration_list body as enum_case nodes that no handler visits. Every other enum language already emits a node + case_of per member via a language extra-walk (Java #1719enum_constant, Kotlin enum_entry, Swift, Scala, C++ enumerator); PHP has none.
Expected
Emit a node and a case_of edge per enum_case, for both backed (: string) and pure enums. Methods must stay intact.
Activity
github-actions commentedon Oct 3, 2026
Thanks for opening this issue, @rajatnagda45. A maintainer will take a look soon.
If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.
To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.
safishamsi commentedon Oct 4, 2026
Fixed in v0.9.75 (live on PyPI as
graphifyy==0.9.75) via #4026, thanks @rajatnagda45. 🙏