By @aaronsaray · 2021-10-21 20:30
By @samuel · 2021-10-25 12:24
I personally don't use IDE helper. Cannot really explain why, but I don't like it much.
I find that I only have two issues with IDE support in my VSCode with Intelephense.
First one is auth()->user()
not returning the application's User
model. For that I create a custom user()
helper typically.
Second one is model properties. I like writing my own /**@ property */
annotations above models, because it's also how I often start developing the database layer. I only write migrations after that.
I think IDE helper solves some facade issues as well, but I never use aliases and always import them fully, and if possible I use global helpers like cache()
.
Other than that, I always use Pest for testing, and larastan in all of my packages. Now I also started using those in my Laravel projects.
For CS, I use php-cs-fixer with my own config.
All of these things can be found in our package template — https://github.com/archtechx/template.
The template also has a neat ./check
script which runs these checks and shows nice output. Very cool for local package development.