How to Configure phpUnderControl
Configuring phpUnderControl

This an overview of configuring phpUnderControl. This includes adding projects using phpUnderControl's command line, enabling PHP Mess Detector, enabling Artifacts, and adding new tab on phpUnderControl's menu.

Install Cruisecontrol


- Java
- Ant (CC ships with its own copy of Ant)

Install phpUnderControl



Add Projects Using phpUnderControl Command Line

By default, if you use phpUnderControl command line, you will be required for version control. While some programs listed under Optional Requirements, can be ignored by specifying some options.

e.g. --without-code-sniffer will disable PHP_CodeSniffer support.


- version control

Optional Requirements

- php code browser
- php code sniffer
- ezComponents Graph library
- php documentor
- phpunit
- php mess detector


./phpuc.php project --project-name test --without-code-browser --coding-guideline Zend --version-control svn --version-control-url https://REPOURL/ --username USER--password 'PASSWORD' --source-dir application --test-dir tests /opt/cruisecontrol

Enable PHPUnit PMD Tab on phpUnderControl

PHP Mess Detector is not included on phpUnderControl's project command so we need to add it manually on our build.xml

<target name="phpmd">
<exec executable="phpmd" dir="${basedir}/source" logerror="on">
<arg line="${basedir}/source/application/ xml codesize,unusedcode,naming
--ignore *.phtml,*/views/scripts/*
--reportfile ${basedir}/build/logs/phpmd.xml" />

Enable phpUnderControl Artifacts

If you add project using phpUnderControl's command line, its artifactspublisher points to logs instead of artifacts folder.

Steps on how to enable phpUnderControl artifacts

- Replace all instance of dest="logs/${}" with dest="artifacts/${}" on your config.xml

Add New Tab on phpUnderControl's Menu

phpUnderControl tab menus can be found in /PATH_TO_CRUISECONTROL/webapps/cruisecontrol/main.jsp.

Steps on how to add new tab on phpUnderControl's menu

- Create /PATH_TO_CRUISECONTROL/projects/PROJECT_NAME/build/xdebug
- Modify /PATH_TO_CRUISECONTROL/config.xml and add these line of codes under <publishers>

<artifactspublisher dir="projects/${}/build/xdebug" dest="artifacts/${}" subdirectory="xdebug"/>

- Modify /PATH_TO_CRUISECONTROL/webapps/cruisecontrol/main.jsp and add these line of codes:

<cruisecontrol:tab name="xdebug" label="Xdebug">
<iframe src="<%=request.getContextPath() %>/<%= artifacts_url %>/xdebug" class="tab-content">