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
[Bug]: PHP member calls dropped in remapped files, through inherited methods, and on repeat call sites #5362
I have checked the Troubleshooting section in the README
What happened?
On PHP, _resolve_php_member_calls drops calls whose target is plain from the source:
Remapped extensions: a file mapped to PHP through .graphifyrc (language.inc=php) gets no Cls::m(), self::m() or parent::m() edges. The resolver checks the literal .php suffix (extract.py, endswith(".php")), while the extractor registry honours the mapping.
$this->m(): the receiver this has no branch. It is looked up in the annotation type table, missing from it, and skipped.
Inherited methods: the method lookup checks only the named class. A self::m(), $this->m() or Cls::m() whose m is declared in a base class gets no edge, and parent::m() reaches one level only.
Repeat call sites: a second call to the same method from the same caller is dropped. The resolver keeps one edge per caller and callee (existing_pairs), so the second line never reaches the build's also_seen ([Feature]: don't erase weaker-confidence evidence when edges or paths merge #4881). Separately, once any C++ header member merges with its .cc definition, _merge_decl_def_classes dedups every edge in the corpus by (source, target, relation, context), which drops repeat call sites in any language.
Expected:
one calls edge per call site;
the method found on the nearest class up the inherits chain, with a tie on that level binding nothing, as the Java resolver does.
Steps to reproduce
mkdir src &&cd src
printf'language.inc=php\n'> .graphifyrc
cat > Base.inc <<'EOF'<?phpclass Base { public function helper() { return 1; } public static function setup() { return 0; }}EOF
cat > Middle.inc <<'EOF'<?phpclass Middle extends Base {}EOF
cat > Child.inc <<'EOF'<?phpclass Child extends Middle { public function run() { $a = $this->helper(); $b = $this->helper(); return $a + $b; } public function boot() { return parent::setup(); } public static function make() { return self::setup(); }}EOF# extract(...) on the three .inc files with root=src, then list the `calls` edges
Error output or graph output
language overrides (.graphifyrc): .inc -> .php
AST cache: 0/3 files served from cache (0%); 3 to extract
calls edges: 0
Activity
github-actions commentedon Nov 20, 2026
Thanks for opening this issue, @livingforelvis. 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.
fix(php): resolve member calls in remapped files and through inherite…
chore(release): fold AST schema 51 and changelog for the #5367..#5364 …