PHP parent::m() binds to the current class's own m — 'parent' is a same-file marker, so all 10 guzzle parent:: binds are wrong #532
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
h-dv/code-index#532
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
In PHP,
parent::m()binds to the current class's ownm, which creates a fake self-recursion edge. On php-guzzle all 10parent::binds are wrong:src/Cookie/FileCookieJar.php:47parent::__construct(...)binds toFileCookieJar::__constructinstead ofCookieJar::__construct.src/Exception/TransferException.php:22binds to itself. Its parent is\RuntimeException.lang-out/php/fixture/src/Child.php:26,32,48reproduces it withresolved_by=tier1q_rel_samefile.Cause
parentis listed as a same-file "type at hand" marker:crates/indexer/src/index.rs:2100REL_MARKERS = ["crate","super","self","Self","static","parent","this","$this"]crates/abi/src/registry.rs:192REL_QUALIFIERS = ["self","this","$this","Self","static","parent"](the same-file-only half)self/static/thisdo mean "this class".parentmeans the superclass, so treating it as same-file anchors it to the wrong class. Note that Rust'ssuperis a module marker and is correctly different.Proposal
parentfrom the same-file markers.parent::Xthrough the class's SUPERTYPE-role ref, which the PHP guest already emits forextends. If there is no project supertype, leave the ref unresolved.super().m()(see #538) wants the same mechanism: a receiver meaning "my direct base(s)".Acceptance
parent::__construct,parent::mwith a project base, andparent::mwith an external base (unresolved).precision_gatePHP: a decoy where the child and parent sharem.parentback intoREL_QUALIFIERS, and the decoy must go red.Found by the per-language review, 2026-11-09. Evidence:
lang-out/php/audit_method_samples.json.Filed from the per-language review on 2026-11-09: 8 agents, one per language plus one for Vue/Svelte/XAML/timeline, run against copies of the pinned corpus repos (
tests/corpus/corpus.toml) using installed build2dcfc615, which differs from master only by XAML/CI commits. The top claim of every issue was spot-checked in the main session. Artifacts live under the review session's scratchpadlang-out/<lang>/and are available on request.buildagent referenced this issue2026-11-09 09:20:55 +01:00
Consolidated into #531 during the 2026-11-09 triage. The remaining scope of this issue is tracked there as a checklist item; this report stays as the detailed evidence.