onurb/doctrine-yuml-bundle
Onurb DoctrineYumlBundle is a Symfony bundle that generates yUML class diagrams from Doctrine ORM entity metadata, making it easy to visualize mappings, associations, and schema structure for documentation and debugging.
Architecture fit. This is a Symfony bundle, not a Laravel package — a critical distinction. It hooks into Doctrine ORM's ClassMetadataFactory to introspect entities/associations and emits yUML syntax (typically as a yuml.me URL) for visualization. In a Laravel context it only fits projects that have deliberately adopted Doctrine ORM (e.g., via laravel-doctrine/orm) rather than Eloquent; for an Eloquent codebase it offers nothing out of the box. Its natural home is a Symfony shop's dev toolchain.
Integration feasibility. Low-to-moderate. Composer install plus bundle registration in config/bundles.php (dev/test only), then invoking a console command against configured entity paths. The real friction is version drift: a 41-star, 0-dependent bundle of this vintage is likely pinned to older Symfony (3/4) and PHP (7.x) constraints, and Doctrine's move from annotations to PHP 8 attributes may break metadata parsing. Expect to fork or patch.
Technical risk. Mostly maintenance and external-service risk rather than runtime risk, since the tool is dev-only and never touches production traffic. The hard external dependency on yuml.me is the sharpest edge: the service has had availability and longevity concerns, and yUML URLs are length-bounded, so large domain models will silently truncate or fail rather than render. With one maintainer, no downstream dependents, and near-zero community signal, bus factor is effectively one.
Key questions. (1) What are the actual composer.json constraints for Symfony and PHP, and does it handle attributes? (2) Does it render locally or only emit a URL to a third-party service? (3) Is there test coverage for association types (OneToMany, ManyToMany, inheritance, embeddables)? (4) What does the equivalent output look like from Mermaid, PlantUML, or SchemaSpy-based tooling, and is that "good enough"? (5) Is the diagram value worth owning a fork?
Recommendation. Treat as a 1–2 day spike, not a dependency commitment. The core logic (walk metadata → emit graph text) is thin — roughly 100–200 lines — so building an in-house console command that emits Mermaid or PlantUML is likely cheaper over a 12-month horizon than adopting and maintaining this bundle.
Stack fit. Symfony-first, Doctrine-only. In Laravel, it is viable only where Doctrine ORM is already the persistence layer; do not introduce Doctrine solely to get diagrams. Install as require-dev so it never reaches production images.
Migration path. (1) Register the bundle in the dev/test environment only, gated behind an environment check. (2) Point it at the entity directories. (3) Capture output as a build artifact in CI or a local make docs target rather than an ad-hoc developer action, so the diagram stays current. (4) If yuml.me is unavailable, either self-host a renderer or — preferred — swap the emitter for Mermaid/PlantUML and commit the generated source file, rendering it in the existing docs pipeline.
Compatibility. Pin explicitly. Verify the bundle's Symfony/PHP matrix against the target application before writing any integration code; if the app is on Symfony 6/7 or PHP 8.2+, assume a fork is required. Confirm Doctrine attribute support, since annotation-era bundles frequently read getAnnotationReader() paths that no longer exist.
Sequencing. Spike in a throwaway branch → validate metadata extraction against the real entity set (including inheritance and embeddables) → assess output fidelity and yUML URL length against the largest bounded context → make an explicit adopt/fork/build decision → only then wire into CI. Front-load the fork-vs-build decision; it dominates the effort estimate.
Maintenance. Low ongoing cost if it works, but effectively unmaintained upstream. Budget for a fork you own: dependency bumps, PHP/Symfony upgrades, and Doctrine API changes all land on your team. Because it is dev-only, the cost is opportunity cost rather than incident cost.
Support. Community-only, single maintainer, no SLAs. Internal ownership must be assigned before adoption; "nobody owns the diagram tool" is the default failure state and it will quietly rot.
Scaling. No runtime scaling concern — it never executes in the request path. The scaling limit is model size: yUML URL length caps will break on large domains, and the resulting diagram becomes unreadable well before that. Per-bounded-context generation is the practical mitigation.
Failure modes. yuml.me outage or retirement; URL length overflow producing truncated or 404 diagrams; Doctrine metadata incompatibility yielding incomplete or silently wrong associations (the worst case — a diagram that looks authoritative but isn't); Symfony version deprecations on upgrade. Add a CI assertion that generated output is non-empty and parses, so silent breakage surfaces.
Ramp-up. A Symfony developer can be productive in under a day; a Laravel/Eloquent developer needs Doctrine familiarity first, which is the larger lift. Net: low ramp-up, low-to-moderate payoff. The tool solves a real problem — keeping the domain model legible — but at 41 stars and zero dependents, the honest TPM position is to validate the idea quickly and, absent a compelling result, reproduce it in-house against Mermaid or PlantUML and own the 200 lines yourself.
How can I help you explore Laravel packages today?