PHP parser: fix 8 finder bugs#111
Open
gadievron wants to merge 3 commits into
Open
Conversation
…::/static:: + <?php-tag root cause (BUG-NEW 20,52) Local-only finder-fixes-54. 6 tests. [20] resolve $f() via a single string-literal binding (multi/non-literal declines). [52] parent::/self::/static:: parse as relative_scope (was unhandled -> dropped); parent:: resolves via a class->parent index + cross-file _resolve_class_call (NOT _resolve_self_call, which is same-file/same-class — independent+judge confirmed via a shadow-method probe). DEEPER ROOT CAUSE fixed: extractor stores bodies without a <?php tag, so tree-sitter parsed them as inline HTML -> ZERO call nodes (masked ALL php edges); prepend <?php before re-parse (idempotent, offset-sound, no spurious 'php' edge — judge-verified necessary + in-scope). Judge+independent: AGREE / SHIP-AS-IS. Local-only; not pushed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit fb4983428c0ebd0d38ab7eafcd4b84df37dc7c1d)
…ine/enum/braceless-ns (BUG-NEW 7,25,36,54) Local-only finder-fixes-54. 4 tests. enum_declaration branch (closes [36] AND the [53] dup — enum methods get class_name); recurse nested functions; start_line past attribute_list [25]; [54] braceless namespace metadata carried to following siblings (sibling-not-child of namespace_definition). Judge+probe: AGREE / SHIP-AS-IS. Local-only; not pushed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit 7efc40e3339f47c6203a11dbbe6b2776c15a6c5e)
… (BUG-NEW 43,28) Local-only finder-fixes-54 (base master 368b559). - [43] create_unit read func_data.get('namespace') but the extractor writes 'namespace_name' (canonical, emitted in 5 sites) -> unit namespace was always None. Aligned the CONSUMER to read 'namespace_name' (1 read + 2 emit sites; lower blast radius than renaming the producer; no other reader of either key). - [28] is_static produced but never carried into unit metadata -> carried it (create_unit + generate_analyzer_output). Adds RF-1 field-contract guard tests/parsers/php/test_php_schema_completeness.py (producer-key -> unit-reader MAP, encodes the namespace rename leg) + a membership self-check. 6 tests; php parser suite passes. Judge (vs prepared recommendation): AGREE / SHIP-AS-IS; consumer is the correct side for [43]. Independent+judge concurred. SURFACED (separate, out-of-scope, not fixed): php extractor never emits 'visibility' (_get_visibility uncalled) -> private methods report public — logged for a separate fix. Local-only; not pushed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit f193401fa6c74764b274150f5a54ccb01dedc927)
Collaborator
Author
|
Merge-order note (not a defect — flagging for landing order)
|
This was referenced Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PHP parser: fix 8 finder bugs
Local-only branch
pr/php-parseroff master368b559. One of a coordinated 7-PR set fixing parser/reachability bugs found by the OpenAnt finder. File-disjoint from the other 6 PRs (no merge collision; any order).Addresses 9 finder bug-ids (8 distinct fixes; 1 ride a same-PR canonical).
Bugs fixed
[7]php-nested-extraction (php/extraction_gap) — genuinely-new (no prior logged entry)[20]php-dataflow_loss-199 (php/dataflow_loss) — Fixes BUG-011 (previously logged; was fixed only on an unmerged branch, still live on master 368b559)[25]php-metadata-420-attrstartline (php/metadata_correctness) — genuinely-new (no prior logged entry)[28]php-schema_field_drift-239-isstatic (php/schema_field_drift) — genuinely-new (no prior logged entry)[36]php-extraction_gap-407-enum (php/extraction_gap) — genuinely-new (no prior logged entry)[43]php-unit_metadata-163-namespace (php/unit_metadata_correctness) — genuinely-new (no prior logged entry)[52]php-namespace_dispatch-253-parent (php/namespace_dispatch) — Fixes BUG-022 (previously logged; was fixed only on an unmerged branch, still live on master 368b559)[53]php-extraction_gap-249-enum (php/extraction_gap) — duplicate of [36] in this PR; closed by the same fix (no separate change)[54]php-metadata-390-bracelessns (php/metadata_correctness) — genuinely-new (no prior logged entry)Dedup status (independent + judge, from raw)
6 genuinely-new · 2 duplicate-of-curated (cross-ref above) · 0 covered-by-curated · 1 intra-PR-duplicate. All re-confirmed STILL PRESENT on pristine master
368b559(git show 368b559:).Tests
Verified GREEN in isolation off pristine
368b559: 16 passed (tests/parsers/php/). New per-bug regression tests + atest_<lang>_schema_completeness.pyfield-contract guard.Notes
🤖 Generated with Claude Code