Conversation
- Add native/queries/php-calls.scm with patterns for function calls, method calls, nullsafe calls, static calls, constructors, and use imports - Route PHP in call_extractor.rs (language, query, method_parent_kinds) - Add "php" to CALL_GRAPH_LANGUAGES, "trait_declaration" to CALL_GRAPH_SYMBOL_CHUNK_TYPES - Add PHP test fixtures and call-graph tests
- Normalize PHP Call/MethodCall callee names to lowercase in Rust extractor so HELPER() matches symbol helper during resolution and lookup - Add COLLATE NOCASE to DB caller queries for case-insensitive matching - Deduplicate call extraction results by (name, line, column) - Add grouped use import query pattern (namespace_use_group) - Add tests for case-insensitive calls, grouped imports, and dedup
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.
Summary
Add PHP call-graph extraction as follow-up to PR #35 (basic PHP semantic parsing). Covers function calls, method calls, nullsafe/static calls, constructors, simple and grouped use imports, with PHP-specific case-insensitive normalization and deduplication.
Changes
native/queries/php-calls.scmwith tree-sitter queries for 8 PHP call patterns (direct, qualified, method, nullsafe, static, constructor, simple use, grouped use)native/src/call_extractor.rs(language binding, query loading, method parent kinds)COLLATE NOCASEto DB caller queries innative/src/db.rs"php"toCALL_GRAPH_LANGUAGESand"trait_declaration"toCALL_GRAPH_SYMBOL_CHUNK_TYPESinsrc/indexer/index.tsTesting
npm run build)npm run typecheck)npm run test:run)npm run lint)Release Labels
feature,bug,performance,documentation,dependencies,refactor,test,chore, orskip-changelog)semver:major,semver:minor,semver:patch) when neededRelated Issues
Fixes #36