Mayflower is proud to announce the release of the open source tool PHP_CodeBrowser in the current version 0.1.0-alpha.
What is PHP_CodeBrowser
PHP_CodeBrowser is a tool mainly intended to be used in conjunction with CruiseControl.
It provides a code browser for PHP files with syntax highlighting and colored error-sections
found by quality assurance tools like PHPUnit or PHP_CodeSniffer.
The visualisation of errors, warnings or notices, found by above mentioned kind of tools,
is the real power of PHP_CodeBrowser.
You may also use PHP_CodeBrowser as a stand alone version, but therefore you would need previous generated XML error files.

PHP_CodeBrowser features
PHP_CodeBrowser comes along with syntax highlighting, colored error sections and a smart clickable error overview.
Supported are XML report files generated from following supported quality assurance tools:
- PHPUnit
- CPD
- Padawan
- CodeSniffer

Why should you use it
Because it’s cool, and it helps strongly getting an complete overview over your code quality in single files.

Installation
If you would like to try out, please check out source directly from SVN:
svn co svn://phpunit.de/phpunit/phpcb/trunk PHP_CodeBrowser
or use pear installation routine:
pear config-set preferred_state alpha
pear channel-discover pear.phpunit.de
pear install –alldeps phpunit/PHP_CodeBrowser
For the integration in cruisecontrol, please have a look at the README file,
or use the current version of phpUnderControl.
When I run it, I get this error:
Generating PHP_CodeBrowser files
PHP-CodeBrowser Error:
File /usr/share/php/data/PHP_CodeBrowser/templates/noErrors.tpl does not exist!
This is fixed in current version 0.1.1 (alpha).
Looks really cool, but how to get it working. The phpcb keeps failing with:
The source defined by parameter –source, differs to the source extracted from log files!
As far as I can tell its coming from PluginError::getRelativeFilePath() which is getting passed NULL to $absolutePath.
Hi Adam,
you will have to use the same source path you used for generating your report files.
i tried every possible source path but nothing worked for me. since i’m using phpunit reports the code browser stopped working with the same error message:
The source defined by parameter –source, differs to the source extracted from log files!
Seems like you are using a different source for phpcb. You will have to use the same folder and path you took for generating your phpunit reports.
Try using current version 0.1.1. In this version the –source parameter is optional.
Wie es dem ThinkPHP Blog zu entnehmen ist, wurde vor einigen Tagen der PHP_CodeBrowser in der Version 0.1.0 Alpha veröffentlicht. Generell dient das Tool zur Begutachtung des Quellcodes eines PHP-Projekts. Der Clou jedoch daran ist, dass man mit Hilfe …
After quite some time of silence around phpUnderControl I have bundled the 0.5.0 release today. Beside minor changes, bugfixes and enhancements this release contains one new major feature, the PHP_CodeBrowser. phpUnderControl integrating PHP_Code
Looks cool, but it doesn’t seem to do anything. It doesn’t give any errors, but the resulting index.html file just says „PHP CodeBrowser Summary No violations are found“ and the cbCodeBrowser.xml file is empty.
The contents of my logs directory is checkstyle.xml (which has no errors/warnings), phpunit.coverage.xml, and phpunit.xml.
Any advice?
In prior version 0.1.0, only files with errors are parsed. If you like to browse other (valid) files as well you will have to use the current version.
I’m having problems running codebrowser on some of my projects that have source in their path more than once.
I’ve detailed the problem on stackoverflow (http://stackoverflow.com/questions/2274307/php-codebrowser-not-following-path-in-checkstyle-xml-correctly).
Is this a bug?
When using –log option: are filenames important in provided directory?