Search by

janalis / doctrineviz

phcorp

Generate Graphviz DOT diagrams from a Doctrine DBAL database schema.

Package info

github.com/janalis/doctrineviz

Type:symfony-bundle

pkg:composer/janalis/doctrineviz

Statistics

Installs: 141

Dependents: 0

Suggesters: 0

Stars: 4

Open Issues: 0

v0.4.2 2026-10-19 11:29 UTC

This package is auto-updated.

Last update: 2026-10-21 05:08:51 UTC


README

doctrineviz

doctrineviz

Your database schema, drawn.
Doctrine DBAL · Graphviz DOT · Symfony bundle

CI Docs Latest release Packagist BSD-3-Clause license

Documentation · Installation · Command reference · Migration

doctrineviz reads your database schema through Doctrine DBAL and generates a Graphviz DOT diagram with tables, columns, primary keys and foreign keys. Run it in a Symfony application, or use the renderer directly with a DBAL schema. Doctrine ORM is optional.

Install

composer require --dev janalis/doctrineviz

Register Janalis\Doctrineviz\DoctrinevizBundle::class for the dev and test environments in config/bundles.php. Requires PHP 8.4+, Symfony 7.4 or 8.x, DoctrineBundle 3.3+, and DBAL 4.5+. See Installation.

Quick start

php bin/console doctrine:schema:graphviz > schema.dot
# Install Graphviz separately to render the DOT file.
dot -Tsvg schema.dot -o schema.svg
dot -Tpdf schema.dot -o schema.pdf

Example database diagram

Highlights

  • Database schema diagrams show the actual schema, including tables not mapped by ORM.
  • Column details include DBAL type, length, nullability, defaults and auto-increment.
  • Relationships preserve composite foreign-key column pairs and self-references.
  • Named connections through --connection=reporting.
  • Optional Gedmo links through --infer-gedmo-translations and --infer-gedmo-logs.
  • Reusable renderer accepts a DBAL Schema without booting Symfony.

Contributing

Read CONTRIBUTING.md and the development guide. Use synthetic schemas in reports and tests; redact connection details and private data.

make install
make verify    # formatting, lint, analysis, workflows, tests, 100% coverage and MSI
make docs      # build the VitePress documentation
make help      # list all developer commands

License

BSD-3-Clause.