Ticket #625 (closed enhancement: fixed)

Opened 20 months ago

Last modified 6 months ago

Integrate PHP_Depend results

Reported by: mapi Owned by: mapi
Priority: major Milestone:
Component: phpUnderControl Version: phpUnderControl 0.4.5
Keywords: metrics, overview page Cc:
PHP Version: 5.3-CVS

Description

phpUnderControl should replace all deprecated PHPUnit reports with PHP_Depend functionality. Additionally it should provide a overview-pyramid on its project-overview page.

Change History

Changed 20 months ago by mapi

  • milestone changed from phpUnderControl 0.4.7 to phpUnderControl 0.4.8

Changed 10 months ago by sb

This could be as simple as having pdepend write the result of --jdepend-chart and --overview-pyramid to the build directory and then use an <artifactpublisher> to copy the two SVGs to the graph directory as 08-dependencies.svg and 09-software-metrics-pyramid.svg.

Changed 7 months ago by sb

  • milestone phpUnderControl 0.4.8 deleted

Milestone phpUnderControl 0.4.8 deleted

Changed 7 months ago by proofek

See  ticket-625 branch on github for the patch.

The following changes are required as well.

Define additional target in build.xml file for PHP_Depend (something like this below)
and create a graph directory in your project's build directory (${basedir}/build/graph).
Assumption has been made that PHP_Depend will save graphs in there.

(...)
       <target name="php-depend">
               <exec executable="pdepend" dir="/path/to/source">
                       <arg line="--phpunit-xml=${basedir}/build/logs/pdepend.xml 
                                 --jdepend-chart=${basedir}/build/graph/08-dependencies.svg
                                 --overview-pyramid=${basedir}/build/graph/09-software-metrics-pyramid.svg
                                 /path/to/source" />
               </exec>
       </target>
(...)

Modify cruisecontrol config.xml file to copy graphs to artifacts dir using artifactspublisher.
See example below.

(...)
        <publishers>
            <currentbuildstatuspublisher file="logs/${project.name}/buildstatus.txt"/>
            <artifactspublisher dir="projects/${project.name}/build/api" dest="artifacts/${project.name}" subdirectory="api"/>
            <artifactspublisher dir="projects/${project.name}/build/coverage" dest="artifacts/${project.name}" subdirectory="coverage"/>
            <artifactspublisher dir="projects/${project.name}/build/graph" dest="artifacts/${project.name}" subdirectory="graph"/>
            <execute command="phpuc graph logs/${project.name} artifacts/${project.name}"/>
            <execute command="phpcb --log projects/${project.name}/build/logs --source /home/proofek/git/phpunit-master/PHPUnit/ --output projects/${project.name}/build/php-code-browser"/>
            <artifactspublisher dir="projects/${project.name}/build/php-code-browser" dest="artifacts/${project.name}" subdirectory="php-code-browser"/>
        </publishers>
(...)

Changed 7 months ago by proofek

Modified phpUnderControl instance can be see  here

Changed 6 months ago by mapi

  • status changed from new to closed
  • resolution set to fixed

Proofek's  branch from github merged.

Note: See TracTickets for help on using tickets.