1
votes

I'm trying to setup SonarQube 4.2 for a PHP/Symfony Project but when i want to configure quality profiles i only find "PHP> Sonar Way" Rules, with the old version (on the same server ) i have PHPCS & PHPMD rules & Zend Rules, did i miss something ?

I also want to add a custom rules files, in old versions it was in $SONAR_SRC/extensions/rules/ but it don't seems to work now.

When i check the PHPCS configuration with "phpcs- i" i have the following results : The installed coding standards are PHPCS, PSR2, PSR1, MySource, Zend, Squiz, PEAR and Symfony2 (I want to use Symfony2 profile)

1

1 Answers

1
votes

This does not seem to be supported anymore, since PHP CodeSniffer has been dropped.

It seems that custom rules are first tested for Java, and if successful will be added for PHP profiles as well.

PSR-2/1 profiles are about to be added in the upcoming release though: http://jira.codehaus.org/browse/SONARPHP-293

See http://sonarqube.15.x6.nabble.com/How-to-add-code-sniffer-standards-rules-in-sonarQube4-2-using-sonar-php-plugin-version-2-1-td5024257.html for a conversation on this.