Repository navigation
Prevent PHP vendor imports from binding unrelated project symbols - #2515
Conversation
|
Checkpoint and handover (2026-10-03 UTC) Published head: The PHP import follow-up depends on #2509; vendor type work continues separately in #2520. Required PR/CodeQL checks did not start after the base-only edit. One exact close/reopen cycle was proposed but remains unapproved; do not substitute another trigger or infer approval from this handover. Hosted snapshot at 2026-10-03 21:54:13 UTC: 1 skipped, 2 success. Confirm the required checks on this exact head before treating it as ready. No additional local build, test, lint, sanitizer, benchmark or CI runs were performed at this checkpoint, as requested. Earlier executed evidence remains historical; prepared tests and the newer source-reviewed changes must still be validated by the hosted gate. The campaign is paused at the maintainer’s request. Local monitoring has stopped; hosted jobs remain running. No merge was performed. Thanks for reviewing this change. |
Filter non-PHP candidates before selection and distinguish an empty namespace map from missing namespace information. Refs #1186. Signed-off-by: Martin Vogel <[email protected]>
e4ee60b to
b0dd5af
Compare
PHP
usestatements outside Composer's PSR-4 mappings could bind unrelatedproject symbols with the same name, including TypeScript classes. Resolve these
imports through declared PHP namespaces, and filter non-PHP candidates before
selection so valid project imports remain available. Existing PSR-4 class-file,
function/constant, and missing-file behavior is preserved.
Adds nine regression/control cases for vendor collisions, project namespace
targets, empty namespace maps, global uses, function and grouped imports,
namespace aliases, NULL-map resolution, and file-path imports. Negative checks
also require extracted imports and successful graph queries.
Validation: changed regions formatted; git diff --check passed. All local
runtime tests, builds, revert checks, and CI were explicitly waived and remain
UNRUN. Depends on #2509 and relates to #1186. This branch includes the PSR-4 prerequisite until it is merged; the PR targets main to trigger the repository's PR and CodeQL workflows.
NULL-map resolution intentionally retains generic PHP candidate selection;
this does not claim to eliminate all vendor-related CALLS collisions.
Existing indexes need reindexing. GitHub validation is pending on the published revision.