Skip to content

A Code browser for PHP files with syntax highlighting and colored error-sections found by quality assurance tools like PHPUnit or PHP_CodeSniffer.

License

Notifications You must be signed in to change notification settings

elger/PHP_CodeBrowser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP_CodeBrowser

Structure

|--> bin/           PHP_CodeBrowser scripts
|--> src/           Source files for PHP_CodeBrowser
|   |--> Plugins/   Plugins for different error handling/types
|
|--> templates/     Template files for PHP_CodeBrowser 
|   |--> css/       Used CSS by templates, Color definition for errors
|   |--> img/       Used images for PHP_CodeBrowser
|   |--> js/        Used javascript for PHP_CodeBrowser
|
|--> tests/         PHPUnit test suite 
|
|--> package.xml    PEAR package information file
|
|--> LICENCE        Licence information
|--> README         Structure and install information
|--> CHANGELOG      Update information

Installation

Git Checkout

$ git clone git://github.com/mayflowergmbh/PHP_CodeBrowser.git

Installation with PEAR Installer

$ pear config-set preferred_state alpha
$ pear channel-discover pear.phpunit.de
$ pear install --alldeps phpunit/PHP_CodeBrowser

Usage

Shell Usage

Usage: phpcb(.php|.bat) --log <dir> --output <dir> [--source <dir>]

--log          Path to xml log files, e.g. generated by phpunit
--output       Path to output directory (must differ from source directory)
--source (opt) Path to project source

In case the optional --source parameter is used the given target directory will be parsed. Errors from log files will be merged into the parsed file list from the target directory.

Otherwise only files from error logs will be parsed.

Integration in CruiseControl

...
<!-- phpcb should be called after xml file generation -->
<target name="build" depends="...,phpcb" />
...
<target name="phpcb">
    <exec executable="phpcb">
        <arg line="--log path/to/log/dir
                   --output path/to/output/dir/
                   --source path/to/source/dir/" />
    </exec>
</target>
...

View the Results

Webbrowser

Open /path/to/defined/output/index.html.

CruiseControl

config.xml

<publishers>
  <artifactspublisher dir="path/to/output" dest="artifacts/${project.name}" subdirectory="PhpCbIdentifier" />
  ...
</publishers>

main.jsp

<cruisecontrol:tab name="PHP_CodeBrowser" label="PHP_CodeBrowser">
  <cruisecontrol:artifactsLink>
     <iframe src="<%=request.getContextPath() %>/<%= artifacts_url %>/PhpCbIdentifier/index.html" class="tab-content">
     </iframe>
  </cruisecontrol:artifactsLink>
</cruisecontrol:tab>

Contact Information

If you have any questions you may get in contact with: Elger Thiele elger.thiele@mayflower.de

About

A Code browser for PHP files with syntax highlighting and colored error-sections found by quality assurance tools like PHPUnit or PHP_CodeSniffer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published