Wiki

Clone wiki

php-project-tree / Home

PHP Project Tree

This is a simple PHP application that parses your PHP source tree and builds an dependency tree based on included|required files (not by class usage/inheritance). Using this information it can answer simple question like:

  • what are the .php files that this specific file depends on (directly/indirectly)
  • what are the files that includ/require directly or indirectly a specific .php file

However, this application has also a package manager function:

  • detects and fixes dependencies
  • creates a class auto load file (autoloader.php)
  • build a tar|bz2|zip installation package of your project files

Starting with only a small set of files of your huge PHP project you select few of them (the core). It can automatically detect the required/included .php files (required directly or indirectly, ie. by file inheritance) and include them in the initial fileset. The resulted filelist can be plotted as a dependency graph (forced-directed graph) and/or exported as a text file. You can analyze the whole set or any individual file. This is useful when you want to get an insight of a project based by file inheritance (bird's eye view) and event to build a small set of files that you later can maintain/include in a deployment script (I use it in Ant).

Overview | How it works | Screenshots | Download | Sandbox

How do I get set up?

  • Summary of set up
  • Dependencies
  • Contact

Summary of set up

Just download the source code and install it on your web server. That's all folks!

Dependencies

The whole thing is so simple that requires almost nothing else than itself.

For the forced-directed graph (the dependency graph) I used the Springy library, a lightweight and simple pure JavaScript library for directed graph drawing. There are only two files that must be downloaded and saved at src/js/springy:

Updated