feat: complete Laravel config navigation with config() helper and typed accessors#96
Merged
AJenbo merged 4 commits intoAJenbo:mainfrom Apr 28, 2026
Merged
Conversation
Add 47 unit tests to helpers_tests.rs exercising every statement and expression arm of the PHP AST walker, plus ControlFlow early-exit.
Add go-to-definition support for typed accessor calls on the config()
helper (e.g. config()->boolean('app.debug')). Covers all 11 repository
methods: get, has, string, integer, float, boolean, array, collection,
set, prepend, push.
Extract shared is_config_repository_method so both the Config:: static call path and the config()-> instance call path reference one list. Also add missing go-to-definition assertions for Config::collection, Config::prepend, and Config::push.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #96 +/- ##
==========================================
+ Coverage 86.59% 86.74% +0.15%
==========================================
Files 164 164
Lines 104416 104711 +295
==========================================
+ Hits 90418 90833 +415
+ Misses 13998 13878 -120 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Description
This PR completes the Laravel configuration navigation support by extending the existing
Config::Facade logic to include theconfig()helper and its fluent method chains. It also introduces a robust test suite for the underlying AST walker.Key Changes
config()Helper Support:config()helper, such asconfig()->get(...)orconfig()->string(...).\config()->get(...)) were not correctly recognized.Config::andconfig()logic to support modern typed accessors:boolean,string,integer,float,array,collection,set,prepend, andpush.is_config_repository_methodhelper to ensure consistency across different access patterns (Facade vs. Helper).helpers_tests.rsforwalk_all_php_expressions, covering various PHP syntax branches (Return, If, Switch, Closures, Match, etc.) to ensure reliable symbol extraction.definition_laravel.rsspecifically forconfig()instance calls and FQN helper usage.Technical Details
src/symbol_map/extraction.rsto detect and extract symbols from method calls originating from theconfig()function.strip_fqn_prefixto provide robust function name matching regardless of the namespace context.Verification
cargo clippyandcargo fmtcompliance.