junstyle / vscode-php-cs-fixer

PHP CS Fixer extension for VS Code
https://marketplace.visualstudio.com/items?itemName=junstyle.php-cs-fixer
MIT License
357 stars 45 forks source link

Use PSR-12 as default Rule Set #181

Closed iudizm closed 2 years ago

iudizm commented 2 years ago

Hi @junstyle, wouldn't it be better to change the default value of the rule set to be "@PSR12" instead of "@PSR2" ?

"As of 2019-08-10 PSR-2 has been marked as deprecated. PSR-12 is now recommended as an alternative."

-- https://www.php-fig.org/psr/psr-2/

junstyle commented 2 years ago

ok, updated

iudizm commented 2 years ago

nice, thanks

lunaneff commented 2 years ago

It'd be even better to change it to @PER. Right now, PER only contains the PSR12 rules, but since PER is an evolving standard, it's better to have it now already and automatically have new rules be applied as they're added

iudizm commented 2 years ago

@laurinneff I agree that @PER is a great idea to cover the new changes being made to PHP.

But, in my opinion, 'Evolving Recommendations' aren't the best to set as default rules, if you take in consideration that the extension will fix the code following the current recommendations. I think the default rule set should be the last defined Standard Recommendations for coding style

junstyle commented 2 years ago

already set to @PER in new version