Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Doctrine Diagram Bundle

Doctrine Diagram Bundle Laravel Package

jawira/doctrine-diagram-bundle

A Symfony bundle for generating diagrams from Doctrine entities. Visualize your ORM mappings as ER diagrams to inspect relationships, schema structure, and entity connections, making documentation and debugging easier.

View on GitHub
Deep Wiki
Context7

📐 Symfony Bundle to generate database diagrams

Frequently asked questions about Doctrine Diagram Bundle
Can I install jawira/doctrine-diagram-bundle in a Laravel application?
No, not as a drop-in package. It is a Symfony bundle whose wiring depends on symfony/framework-bundle: a bundle class, a DI extension loading service definitions, and console commands registered through Symfony's container, plus a bundles.php entry. Composer autoloading will succeed in Laravel, but the service graph never assembles and there is no extra.laravel.providers discovery. For Laravel, wrap the underlying jawira/doctrine-diagram library in an Artisan command instead.
How do I install and register the bundle in a Symfony project?
Require it with Composer and enable it in config/bundles.php, then configure any options under your bundle config key. Version 2.0.0 requires PHP 8.2 or newer and Symfony 7 only, so check your platform before installing. There is no Laravel equivalent of this registration step, which is the main reason the package cannot be consumed directly from Laravel.
What PHP and Symfony versions does version 2.0.0 require?
v2.0.0 raises the floor to PHP 8.2 and supports Symfony 7 only, dropping Symfony 6 support entirely. That rules out Laravel 10 projects still on PHP 8.1, even though the tool itself is dev-only. Laravel 11 and 12 applications already meet the PHP and Symfony component requirements, so the floor is clean there.
Which diagram output formats does the bundle support?
It supports common textual diagram outputs including PlantUML, Mermaid, and Graphviz. Mermaid and PlantUML source are plain text you can commit to your repository or embed in docs. Pick the format your documentation pipeline already renders so you avoid adding new tooling.
How do I generate an entity diagram from the command line?
The bundle registers a Symfony console command that scans your Doctrine mappings and emits the diagram to a file or standard output. Run it through bin/console in a Symfony app; check the README for the exact command name and its options, since the CLI contract changed in v2.0.0. In Laravel you would replicate this with an Artisan command built on the non-bundle library.
How do I include or exclude specific entities from the generated diagram?
Version 2.0.0 adds an include filter and changes exclude from a comma-separated list into a repeatable flag, so scripted invocations written for v1 will break. Filtering is described at the entity level, so verify how associations and embeddables that cross a boundary are handled before relying on a scoped diagram. Scoping per module makes omissions far easier to spot during schema reviews.
Does the bundle work with multiple Doctrine entity managers?
Yes, multiple entity managers are supported, which matters for DDD or bounded-context codebases that keep separate mapping sets. You can generate a diagram per manager to keep module boundaries visible. This is a Doctrine-only capability and has no meaning for Eloquent models.
Do I need Java or Graphviz installed to render the diagrams?
It depends on the output format: PlantUML needs a Java runtime plus the PlantUML jar, and Graphviz needs the dot binary available on the machine. Mermaid output is plain text and needs no external binaries, which makes it the safest choice for CI runners. Plan for these dependencies explicitly if diagram generation is part of your pipeline.
What Laravel alternatives exist for generating diagrams from Eloquent models?
Several packages introspect Eloquent models and their relationships and emit Graphviz or Mermaid output, and beyondcode/laravel-er-diagram-generator is a common starting point. Check maintenance status and Laravel version support before adopting one, since the ERD tool space churns. If your domain layer already uses Doctrine, a thin adapter around jawira/doctrine-diagram gives you the same output with one command in both stacks.
Is the bundle actively maintained, and what breaking changes should I expect?
Version 2.0.0 confirms an active maintainer, but it is a single-maintainer package with essentially no dependents, so vendor concentration is a real risk. The major bump dropped Symfony 6, raised PHP to 8.2, changed the exclude flag semantics, and moved to jawira contracts v2, which conflicts with v1 libraries in the same tree. Pin versions, watch upstream majors, and confirm that the underlying doctrine-diagram library ships on contracts v2 at the same time, since the adapter path depends on it.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource