Laravel Idea 4.4: @class directive, routes completion for JS, Translations and Livewire support improvements, and much more
This release contains a lot of new features: it closes more than 20 public issues and about 10 internal tasks. We decided to start to make blog posts about each major update.
Laravel Idea will support only the last 3 major PhpStorm updates starting from this version, so Laravel Idea 4.4 will be available for 2020.3, 2021.1, and 2021.2 PhpStorm versions.
A new @class directive introduced in the Laravel 8.51 version is fully supported:
Two new type providers will help PhpStorm to understand the type of $this variable in some cases.
Some libraries, like Livewire, use $this variable in the Blade to connect the view and corresponding class(component).
PhpStorm now will understand its type:
Second place is lambdas inside ::macro() calls:
A lot of new Livewire completions were added. wire: HTML attributes and their values:
A new "smart GoTo" - redirecting PhpStorm to correct Eloquent scope and accessor/mutator methods:
Another smart feature - completion for request array keys. Here it will collect email, name, and password fields, but remove password from the result set because of except call:
Translations support improvements - default language values showing in the right part of completion items and parameters completion:
Also, don't forget about the big feature which currently is under active development:
The first draft of the Translation editor feature. There is still a lot of work to do, but it looks great already! I hope to release it in September. pic.twitter.com/DuceiYp50x— Laravel Idea (@laravel_idea) August 11, 2021
All phpDocs in code generations are now optional. Also, Laravel Idea will add return types there for projects with PHP >= 7.0. Everything is configurable in the settings:
- "Unused element" for classes and methods of console commands and Blade/Livewire components.
- "Unhandled \Illuminate\Validation\ValidationException" (this one was solved with some kind of elegance. I'll try to write a blog post about it).
- Improved fetching for blade-ui-kit/blade-icons package icons sets.
- "auth:sanctum" middleware completion if "laravel/sanctum" package is installed.
- $request->isNotFilled() completions
- to_route() function parameters completion
- ->withoutMiddleware() method parameter completion
- completion for $touches Eloquent field
- assertDatabaseHas(Post::class, ['completion'])
- $validator->sometimes() method validation rules completion
Thank you for keeping up with the last updates! We hope they will improve your productivity.
Laravel Idea team.