https://docs.devsense.com/en/vscode/editor/formatting#code-style-laravel
Hi, can this be made to follow Laravel's official style? https://github.com/laravel/pint
phptools thanks for the link - may I ask if there is something specific we do differently?
Well, it's not clear which rules will be followed when we declare "Laravel", that is why I raised this.
My concern is that slight differences with formatters will introduce "noise" in the commits.
phptools makes sense; I agree we should document this as a set of rules that we internally maintain.
Edit: a side note - we have tests that ensure the "laravel" code style don't change existing Laravel source code.
JakubMisek haha why not make the rules public? so laravel/pint is actually php-cs-fixer with a bunch of rules. Is the devsense formatter based on php-cs-fixer?
laravel/pint
php-cs-fixer
phptools it's our implementation so it can run on a background thread, without php, natively, and only for a selection range of code;
php
We have the rules sort of public through settings "php.format.rules.*", but code styles themselves are described vaguely (https://docs.devsense.com/en/vscode/editor/formatting#code-styles).
"php.format.rules.*"
JakubMisek ok, the challenge about code style is must be exactly the same, otherwise commits become very noisy. I can't think of any good way forward also.
phptools agree, we only have tests so the code style won't break the existing laravel codebase. That should be ok.
Anyways, documenting the codestyle is important as well.
Just a side note... If you find anything that is not being followed according to the Laravel code style, please let us know.
MiloslavBeno ok