Tinkerwell provides best-in-class autocompletion for your PHP projects. Therefore, Tinkerwell indexes your codebase to quickly find the code that you need – the fuzzy search provides you with a world-class search logic, no matter if you are searching for classes, methods, constants or simply chain method calls.
Auto code completion works for local projects as well as for projects that you access via SSH. This works by indexing a local version of your remote project to provide the autocompletion features.
The autocompletion feature uses a language server to index your codebase and provide autocompletion features. This language server does not work on WSL paths at the moment and so it does not work with WSL based projects on Windows. We hope to solve this in the future.
The code completion feature of Tinkerwell runs a PHP based language server locally – this means that you need a working PHP version on your local machine, even if you access your application via SSH, Docker or Laravel Vapor. The language server needs PHP versions 8.0+
and you can configure the local PHP version in the general settings. The PHP binary does not need to match the PHP version of your project.
Code completion on remote projects works by indexing a local version of your remote application. This has the benefit that the indexing does not need to scan your remote project at all. To enable autocompletion for existing projects or add it to new ones, set the path to the local project on your machine in the connection settings.
Laravel uses magic methods heavily – for example if you access a model to run Eloquent queries, Eloquent calls are usually done via these magic methods. The language server is not smart enough to detect these methods (yet), but you can make this work as you do in PHPStorm or VS Code. Install the Laravel IDE Helper Generator as a dev dependency and enjoy code completion for even complex scenarios.
You can install the package via:
composer require --dev barryvdh/laravel-ide-helper
After that, you can reindex your project by clicking on the language server status message on the bottom right.
Sometimes things don't work as expected and this is why you are looking at this troubleshooting guide. You can fix most problems by checking these steps:
7.4+
)macOS: ~/.cache/phpactor
Linux: ~/.cache/phpactor
Windows: C:\Users\USERNAME\.cache\phpactor