stella-maris / callmap-cli
从 callmap JSON 文件创建 PlantUml 图形
0.1.0
2023-10-08 15:03 UTC
Requires
- php: ^8.1|^8.2|^8.3
- symfony/console: ^6.0
Requires (Dev)
- roave/security-advisories: dev-latest
Suggests
README
一个创建应用程序方法调用概览的工具。
此工具从 CallMap-JSON 文件生成 PlantUML 文件。
安装
最好使用 composer 安装 CallMap-CLI
composer require --dev stella-maris/callmap-cli
用法
创建 callmap-JSON 文件后(例如,通过 PHPStan 的 stella-maris/callmap 插件)可以通过以下命令创建 PlantUML 文件:
./bin/callmap render <path/to/callmap.json>
这将生成当前目录下的 callmap.plantuml
文件。
您可以使用此文件通过 PlantUML 渲染器(如http://www.plantuml.com/plantuml/uml/)生成 PNG 或 SVG。
对于应生成类似这样的 stella-maris/callmap
插件
完整链
# Install PHPStan
composer require --dev phpstan/phpstan 1.11.x-dev
# Install plugin
composer require --dev stella-maris/callmap dev-main
# parse the sources and generate the callmap.json file
./vendor/bin/phpstan analyse -c vendor/stella-maris/callmap/callmap.neon [path/to/your/sources]
# Install the callmap cli
composer require stella-maris/callmap-cli@dev-main
# Convert the callmap.json file into a callmap.plantuml file
./bin/callmap render callmap.json
# Render a PNG file from the callmap.plantuml file
docker run -v "$(pwd):/app" -w "/app" ghcr.io/plantuml/plantuml callmap.plantuml
在此文件夹中完成时,应创建类似这样的 PNG 文件