This issue can be closed. The problem is fixed by using --phpunit-xml instead of --jdepend-xml to generate the PHP_Depend XML logfile.
However, this sounds broken to me as --phpunit-xml is likely to go away at some point. Back in 2007 [1] I added functionality to PHPUnit to calculate, collect, and report software metrics. This was, of course, wrong. Half a year later [2] I removed that functionality from PHPUnit. At the time some people were relying on PHPUnit's XML logfile for these software metrics which is why Manuel Pichler added the --phpunit-xml argument (and respective logfile format) to PHP_Depend.
Long story short: pdepend + --jdepend-xml gives you a logfile that follows a de-facto standard while pdepend + --phpunit-xml gives you something that is deprecated.
Now if the logfile generated by --jdepend-xml does not contain all the information you need please have a look at --summary-xml. This is the actively maintained logfiles format of PHP_Depend.
–
[1] http://sebastian-bergmann.de/archives/689-PHPUnit-and-Software-Metrics.html
[2] http://sebastian-bergmann.de/archives/744-On-PHPUnit-and-Software-Metrics.html
Same error for me.
at org.sonar.plugins.php.phpdepend.PhpDependResultsParser.getMetrics(Php
DependResultsParser.java:287) [sonar-php-plugin-0.3.jar:na]
"Embedded error: org.sonar.api.utils.SonarException: PDepend report isn't valid:
pdepend.xml
Cannot construct org.sonar.plugins.php.phpdepend.xml.MetricsNode as it does not
have a no-args constructor
"
Error reproduced with those 3 configs :
Sonar 2.10 + PHPSonar 0.4
Sonar 2.7 + PHPSonar 0.4
Sonar 2.7 + PHPSonar 0.3
All the pear packages have the versions said in the documentation
This error is blocking and prevents from using the SonarPHP plugin totally !