In sonarqube the quality profiles available in PHP are only the followings:
Drupal
PSR-2
Sonar Way
As explained here PSR-2 and here PSR-12, PSR-2 is deprecated. So why sonarqube still use this profile instead of the new one? Is there a way to download and import the new PSR-12 ? I tried googling about quality profiles, but I found only documentation on building new profiles from scratch.
(My projects are mostly built on Laravel, so if there are some quality profiles specific to this framework, it could add more control on top of PSR-12)
The answer to the question of why SonarQube still references PSR-2 and provides it by default instead of providing a PSR-12 is simple: we invested no time on refreshing the default list of Quality Profiles we provide for PHP. Still, providing a PSR-12 QP is part of our backlog and we are waiting for more requests to come to make it a bigger priority on our side.
If you do the effort to review SonarQube’ rules and create a PSR-12 Quality Profile yourself, then we will more than happy to receive your contribution (you can easily backup a Quality Profile and share it with us).
Hi Alexandre,
Can you please confirm if Sonarqube 10.5 community version supports all PHP PSR-12? Or can you please give some reference link where I can see the PSR-12 supported rules in Sonarqube 10.5 community version.