Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Issue Description
Environment
- Editor: Cursor
- Language: PHP
- Framework: Hyperf (using dependency injection container)
Problem Statement
When using Hyperf framework’s make() container function, Cursor cannot provide complete method navigation support for chained method calls.
Steps to Reproduce
Code Example
Service Class Definition
<?php namespace App\Service; class UserService { public function getUserById($id) { return User::find($id); } public function createUser($data) { return User::create($data); } public function updateUserStatus($id, $status) { return User::where('id', $id)->update(['status' => $status]); } } Controller Usage <?php namespace App\Controller; use App\Service\UserService; class UserController { public function show($id) { // Issue: Cannot jump directly to getUserById method $user = make(UserService::class)->getUserById($id); // ^^^^ ^^^^^^^^^^^ // Can jump to class Cannot jump to method return response()->json($user); } public function create($request) { // Same issue here $result = make(UserService::class)->createUser($request->all()); // ^^^^^^^^^^ // Cannot navigate to this method return response()->json($result); } } About make() Function make() is Hyperf's container resolution function, equivalent to: // Traditional way $userService = new UserService(); $user = $userService->getUserById($id); // Container way $user = make(UserService::class)->getUserById($id); Current Behavior - ✅ Ctrl+Click on UserService::class → Can jump to class definition - ❌ Ctrl+Click on ->getUserById($id) → Cannot jump to method definition - ❌ No method parameter hints or documentation display Comparison with Other IDEs - PHPStorm: Perfect support, can directly jump to getUserById method - VS Code + PHP Intelephense: Partial support - Cursor: Currently unsupported Expected Behavior Hope Cursor can: 1. Recognize that make(ClassName::class) returns an instance of ClassName 2. Support method navigation in chained calls: make(Class::class)->method() 3. Provide method parameter hints and auto-completion 4. Display method PHPDoc documentation Common Use Cases This pattern is very common in modern PHP frameworks: // Hyperf make(UserService::class)->getUserById($id); make(OrderService::class)->processOrder($data); make(CacheService::class)->get($key); // Laravel (similar issue) app(UserService::class)->getUserById($id); resolve(OrderService::class)->processOrder($data); // Symfony (similar issue) $container->get(UserService::class)->getUserById($id); ### Expected Behavior Technical Suggestions Possible solutions: 1. Enhance static analysis support for make() function 2. Add recognition for common DI container functions 3. Improve PHP type inference mechanisms Impact This limitation significantly affects modern PHP development efficiency, especially in projects using dependency injection containers, where developers cannot quickly navigate to method definitions and view method signatures. Steps to Reproduce 1. Create a PHP project using Hyperf framework 2. Define a service class with methods 3. Use make(ServiceClass::class)->methodName() in another file 4. Try to Ctrl+Click on the method name 5. Observe that navigation fails Additional Context - This affects all container-resolved method calls - The issue impacts developer productivity in modern PHP frameworks - Static analysis should treat make(Class::class) as equivalent to new Class() ### Operating System MacOS ### Version Information Version: 2.6.18 VSCode Version: 1.105.1 Commit: 68fbec5aed9da587d1c6a64172792f505bafa250 Date: 2026-03-10T02:01:17.430Z Build Type: Stable Release Track: Default Electron: 39.6.0 Chromium: 142.0.7444.265 Node.js: 22.22.0 V8: 14.2.231.22-electron.0 OS: Darwin x64 25.2.0 ### Does this stop you from using Cursor Sometimes - I can sometimes use Cursor