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: app(X::class)->method() misresolves to the *enclosing* class's own method of the same name (wrong edge, not a missing edge) #76
The documented limit is that service-locator calls "never resolve" — no static tool can bind app(X::class). That would be acceptable: a missing edge is a known unknown.
What actually happens is worse. app(Handler::class)->handle() inside a class that itself has a handle() method produces a calls edge to its own handle(), not to Handler::handle(). The graph asserts a call that does not exist, and the real callee gets no incoming edge at all.
A consumer cannot detect this: the edge looks exactly like a legitimately resolved call.
ScoreAssessmentAnswerJob::handle() (L42, own class)
Neither HandleFailedAssessmentEvaluation nor HandleFailedAssessmentScoring has a single incoming calls edge in the graph — so "what breaks if I change the failure handler?" returns a false negative, while "what does failed() call?" returns a false positive pointing back into the job itself.
Suggested fix
When the receiver expression is a container call (app(...), resolve(...), App::make(...)), suppress method-name resolution against the enclosing class scope. If the ::class argument is a literal, an indirect_call edge to that class's method would be recoverable and strictly better; otherwise emit nothing.
Triage: pursue (high — wrong edge at EXTRACTED confidence, worse than missing). app(X::class)->m() binds to the enclosing class's own same-named method: simultaneously a false positive and a false negative on Laravel's canonical failed()-handler idiom. Lives in the member-call receiver-capture arm (engine.py:5382-5432/5634), NOT the scoped-call path of #73 — separate unit: defer on function_call_expression receivers (refuse), optionally an indirect_call from a literal ::class argument. No documented refusal covers container receivers today.
Activity
filipechagas commentedon Aug 11, 2026
Triage: pursue (high — wrong edge at EXTRACTED confidence, worse than missing).
app(X::class)->m()binds to the enclosing class's own same-named method: simultaneously a false positive and a false negative on Laravel's canonical failed()-handler idiom. Lives in the member-call receiver-capture arm (engine.py:5382-5432/5634), NOT the scoped-call path of #73 — separate unit: defer onfunction_call_expressionreceivers (refuse), optionally anindirect_callfrom a literal::classargument. No documented refusal covers container receivers today.