Version 3 (modified by anonymous, 7 years ago) (diff)

Took me a few minutes to get this to work, hope this helps some one else.

PHPDocumentor plugin for Trac


Integrates phpdocumentor documentation into Trac.

Started as a simple copy of the DoxygenPlugin

The phpdoc plugin provides a new main navigation tab (named PHPDoc by default), which will present the doxygen index page.

Configuring the PHPDoc plugin should be easy if you have only one PHPDoc generated documentation to wrap, and a bit more involved if you have many --but the goal is to have a great deal of flexibility, in the latter case.

This plugin is tested with the following releases of Trac:

  • Trac 0.11: Started development with Trac 0.11.3

Bugs/Feature Requests

Existing bugs and feature requests for PhpdocPlugin are here.

If you have any issues, create a new ticket.


Download the zipped source from [download:phpdocplugin here].


You can check out PhpdocPlugin from here using Subversion, or browse the source with Trac.



  • Download the zipped source.
  • Extract the zip file
  • Go to the phpdocplugin/0.11 directory
  • run:
    python ./ install

This will generate a python egg and copy it into the trac/plugins directory and follow the Configuration steps outlined below.

You may need to restart web server to see PHPDoc button in navigation tab.

add the following to your configuration:

Configuring Trac

Basic Configuration

A [phpdoc] section should be created in TracIni. There's only one mandatory setting, it's the path to the generated documentation. This should match the -t parameter of the phpdoc command (if that's a relative path, you'll need to prepend the current working directory used when running phpdoc). Also, don't forget to grant the users the PHPDOC_VIEW permission, or you'll just get a blank page.

Note that there's also the -o parameter which might play a role here. I got best results with the value 'HTML:Smarty:PHP'


First checkout the latest version of your trunk:

cd /var/cache/phpdoc
mkdir myproject
cd myproject
svn co source
mkdir doc
/whereever/you/installed/phpdoc -o HTML:Smarty:PHP -d source -t doc

Now you should have the latest source in /var/cache/phpdoc/myproject/source And the generated documentation in /var/cache/phpdoc/myproject/doc

Now setup Trac's configuration:

path = /var/cache/phpdoc/myproject/doc

The next time, you only need to run "svn up" in stead of "svn co" and runphpdoc again with the same parameters.

It's possible all other options (configuration options multiple documentation projects, links in wiki) will work also, just like the ones specified with DoxygenPlugin, but I can't garranty anything. On a first view, it appears to work good enough for me with this source and configuration.

Note: If you install the plugin globally, you'll also need to enable it in trac.ini as follows:

phpdoctrac.* = enabled

It's possible to create links to phpdoc documentation from anywhere within a Wiki text, by using the phpdoc: link prefix.

The general syntax of such links is: phpdoc:documentation_file.

Some examples:

[doxygen:index.html Documentation] # Simple documentation in doxygen path.

[doxygen:Database/db.html Class db from Package Database] @ Link to a class in a Package

Recent Changes

7799 by exarv on 2010-03-30 16:41:04
re #6833 - Changed None to an empty string
5890 by exarv on 2009-05-29 15:12:13
First initial version of the PhpdocPlugin.
Currently mainly a copy of the Doxygen plugin, with all doxygen words replaces by phpdoc,
and some extra css to make the HTML:Smarty:PHP layout of PHPDocumentor look good.
5889 by exarv on 2009-05-29 15:06:32
New hack PhpdocPlugin, created by exarv


Author: exarv