PHPStan plugin to create a dependency related visualisations.
Create a dependency matrix to see what part of your application is depending on what other parts.
./bin/phpdepend matrix <path/to/callmap.json># Install PHPStan
composer require --dev phpstan/phpstan
# Install plugin
composer require --dev phpdepend/callmap dev-main
# parse the sources and generate the callmap.json file
./vendor/bin/phpstan analyse -c vendor/phpdepend/callmap/callmap.neon [path/to/your/sources]
# Install the callmap cli
composer require phpdepend/phpdepend@dev-main
# Convert the callmap.json file into a matrix.html file
./bin/phpdepend matrix callmap.jsonCreate an overview of your applications method-calls. Graph generates a PlantUML file from a CallMap-JSON file.
After you have created a callmap-JSON file (for example via the stella-maris/callmap plugin for PHPStan) you can create the PlantUML file via this command:
./bin/phpdepend graph <path/to/callmap.json>This will generate a PlantUML file in the current directory names callmap.plantuml.
You can use this file to generate a PNG os SVG using a PlantUML renderer like at http://www.plantuml.com/plantuml/uml/
For the phpdepend/callmap plugin that should generate something like this:
# Install PHPStan
composer require --dev phpstan/phpstan 1.11.x-dev
# Install plugin
composer require --dev phpdepend/callmap dev-main
# parse the sources and generate the callmap.json file
./vendor/bin/phpstan analyse -c vendor/phpdepend/callmap/callmap.neon [path/to/your/sources]
# Install the callmap cli
composer require phpdepend/phpdepend@dev-main
# Convert the callmap.json file into a callmap.plantuml file
./bin/phpdepend graph callmap.json
# Render a PNG file from the callmap.plantuml file
docker run -v "$(pwd):/app" -w "/app" ghcr.io/plantuml/plantuml callmap.plantuml
