phpdocumentor/guides-graphs
Graph extension for phpDocumentor Guides that adds diagram/graph rendering support to your documentation. Generate visual graphs from source definitions and integrate them into Guides output as part of your build pipeline.
composer require --dev phpdocumentor/guides-graphs
guides-graphs is a plugin for Guides, not a standalone tool.```graphviz
digraph G {
A -> B;
B -> C;
A -> C [label="direct"];
}
```
phpdocumentor guide:build. The graph will be automatically rendered (default: SVG) and embedded in the output.π‘ First use case: Embed system architecture diagrams directly in your API docs to keep them in sync with code β update the DOT source, rebuild, and the diagram updates.
reference/system-design.md).theme_options.graphs.renderers in guide.yaml to configure renderer preferences or fallbacks:
theme_options:
graphs:
renderers:
graphviz:
format: svg
engine: dot
guides_graphs.renderer. Ideal for internal DSLs (e.g., plantuml, mermaid, or domain-specific diagram formats).assets/graphs/ folder for deployment.<img> tags needed β just the code block.π Workflow tip: Start with Graphviz (DOT) for quick prototyping, then refactor complex diagrams to custom renderers as your docs mature.
dot on $PATH. In containerized/CI builds, ensure itβs installed (apt-get install graphviz on Debian/Ubuntu).format: png and verify font rendering consistency (embed fonts if needed).output/{theme}/assets/graphs/ by default β double-check this path aligns with your static hostβs asset strategy.--force to rebuild all graphs (e.g., when updating the DOT library or renderer config).--debug to the guide:build command to see renderer logs.guide.yaml (cache: false).GuidesGraphsExtension class is your entry for registering custom renderers β register services in services.yaml or a custom extension class.src/Renderer/GraphvizRenderer for reference).How can I help you explore Laravel packages today?