Deptrac

(( gitHubWatchers )) (( gitHubStars )) (( gitHubForks ))

Deptrac is a static code analysis tool that helps to enforce rules for dependencies between software layers in your PHP projects.

Installation

Install from a Composer package as a dev dependency (with Composer)

Make sure you have Composer and all dependencies graphviz installed.

Require it as a dev dependency:
composer require --dev sensiolabs-de/deptrac-shim
Run it:
php vendor/bin/deptrac

Install from a PHP Archive (with curl or wget)

The PHPUnit documentation has a clear manual on how to install PHARs on Windows.

If you have the Suhosin extension enabled, make sure to allow the execution of PHARs in your php.ini:
suhosin.executor.include.whitelist = phar

Make sure all dependencies are installed: graphviz.

Locally (master)

Download it:
wget -O deptrac.phar https://github.com/sensiolabs-de/deptrac/releases/download/0.6.0/deptrac.phar
or
curl -sSL https://github.com/sensiolabs-de/deptrac/releases/download/0.6.0/deptrac.phar -o deptrac.phar
Use it:
php deptrac.phar

Globally (master)

Download it:
wget -O deptrac.phar https://github.com/sensiolabs-de/deptrac/releases/download/0.6.0/deptrac.phar
or
curl -sSL https://github.com/sensiolabs-de/deptrac/releases/download/0.6.0/deptrac.phar -o deptrac.phar
Install it as an executable:
chmod a+x deptrac.phar
sudo mv deptrac.phar /usr/local/bin/deptrac
Use it:
deptrac