docs: narrow the stale PHP LIMITATION comment - #1486
Conversation
#1185 stage 1 made this comment false. It says cgr "does not track the `namespace` declaration", which stopped being true when #1484 merged -- `php_module_namespaces` records it and `_php_target_for_namespace_import` binds through it. The comment sits in `_is_external_import`, a different path from the one the fix touched, so it survived the change and now asserts the opposite of the code a few hundred lines away. A comment contradicting its own module is worse than no comment: it is the artifact a reader trusts when deciding whether the capability exists. Narrowed rather than deleted, because a real gap remains and is worth naming: a target whose namespace NO indexed module declares is still indistinguishable from a first-party one the resolver could not place, and both defer to the trie. Verified rather than reasoned: declared namespace (App.Text) -> ('Function', 'proj.text.format') UNdeclared namespace (Vendor) -> None (defers to the trie)
|
claimed by feat-duplicates-clickable-locations |
|
@greptileai review ac7517f |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe change rewrites a comment in ChangesPHP import resolution
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This is a narrowly scoped documentation correction with no runtime behavior change, so no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description is detailed and covers the problem, narrowed scope, related issue, validation results, and test limitations. It does not use all template headings or checklist items, but it provides the required context for this comment-only change.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
@greptileai review ac7517f The previous attempt errored out rather than producing a verdict (reference Everything else on this PR is green: zero failures, zero unresolved threads, and SonarCloud reports 0 issues analysed at The change is comment-only. It narrows a Narrowed rather than deleted, because a real smaller gap remains and is worth naming — a target whose namespace no indexed module declares still defers to the trie. Verified by execution rather than reasoning: |
Greptile SummaryThis comment-only change updates the PHP import-resolution limitation note to reflect current behavior. Direct execution confirmed that a Confidence Score: 5/5Safe to merge: the revised comment matches the observed PHP namespace-resolution behavior, and no executable code changed. The focused resolver probe ran successfully against both the parent revision and the current revision, producing the expected declared- and undeclared-namespace results with no behavioral difference. Files Needing Attention: None.
What T-Rex did
Reviews (1): Last reviewed commit: "docs: narrow the stale PHP LIMITATION co..." | Re-trigger Greptile |



Follow-up to #1484.
The problem
That PR made this comment false. It says cgr "does not track the
namespacedeclaration" — which stopped being true the moment #1484 merged:php_module_namespacesrecords it, and_php_target_for_namespace_importbinds through it.The comment lives in
_is_external_import, a different code path from the one the fix touched, so it survived the change and now asserts the opposite of code a few hundred lines away.A comment contradicting its own module is worse than no comment — it is exactly the artifact a reader trusts when deciding whether a capability exists. It was also the comment I cited as motivation when opening #1185, so leaving it would misdirect the next person twice over.
Narrowed, not deleted
A real gap remains and is worth naming: a target whose namespace no indexed module declares is still indistinguishable from a first-party one the resolver could not place, and both defer to the trie. Deferring stays correct there — treating it as external would suppress the trie fallback and drop the call.
Verified rather than reasoned
Comment-only change; no behaviour is touched.
Noted for completeness:
ty checkfails in this fresh worktree on unresolvable optional imports (numpy,qdrant_client,pymilvus). Zero of those errors are in the changed file — same worktree-venv gap seen on #1484, which passed once the extras were installed.Summary by CodeRabbit
use functionimports and namespace resolution.