Open AlexKratky opened 2 years ago
Agreed! I would also love it if it could work like this!
@tianyiw2013 I don't think this is the same problem, I use includePaths settings, so if I write something in other project than project1, I get typehints for classes from /project1/shared/ directory, but If I click Find all reference on some class in shared directory, it will find references only for project1 folder
<?php
namespace Project1\Shared;
class TransactionService { public function placeTransaction(): void {} }
* /project2/app/Http/Controllers/ExapleController.php
```php
<?php
namespace App\Http\Controllers;
use Project1\Shared\TransactionService;
class ExapleController {
public function __construct(private TransactionService $transactionService) {}
public function index() {
$this->transactionService->placeTransaction();
}
}
Typehints in ExapleController works great, but If I am in Project1\Shared and have open TransactionService and try to click on "Find All References" of placeTransaction method, It will not found anything.
Any further news on this issue?
Currently If I use function "Find All References" on a method, it will search within current workspace directory, but it will be helpful if this method could be used within other directories within Multi-root Workspace.
I have 4 projects, where the one (largest) have directory called "Shared", which, as the name says, shares code (services, models, etc.) across remaining 3 projects, so If I refactor some services in this directory and want to use Find All References, I must open the root directory as single project or use global search.
Workspace settings: