Nadeen Nilanka
Nadeen Nilanka

Reputation: 51

PHPUnit3.6 with Ant Alternative for --log-pmd,--log-metrics?

does anyone know the alternative for --log-pmd,--log-metrics?

<arg line="--colors --coverage-html ${basedir}/build/report
             --log-junit ${basedir}/build/logs/phpunit.xml 
             --log-pmd ${basedir}/build/logs/phpunit.pmd.xml
             --log-metrics ${basedir}/build/logs/phpunit.metrics.xml
             --coverage-clover ${basedir}/build/logs/phpunit.coverage.xml 
             AllTests.php"/> 

in phpunit 3.6 does not have --log-pmd,--log-metrics commands please anyone tell how do i write these command in 3.6 phpunit version

Upvotes: 2

Views: 210

Answers (1)

edorian
edorian

Reputation: 38981

PHPUnit 3.6 does not have the functionally behind those switches anymore.

--log-pmd was removed because of the way more useful and more powerful project

PHPMD - PHP Mess Detector that you can use standalone without phpunit


While --log-metrics was removed and for all things metrics you want to turn to the

PHP_Depend software analyzer and metric tool.


For basic metrics and a project size overview (loc, nloc, cc, avg. cc/method) there is the phploc command line tool.

Documentation on how to use those tools (with ant)

can be found over at jenkins-php.org. Looking at the build.xml you will see how to use those to generate CLI and xml output.

Upvotes: 3

Related Questions