wizad/doctrine-doc-bundle
A Symfony bundle that generates browsable documentation from Doctrine entity metadata, making it easier to inspect mappings, fields, associations, and database structure without digging through source code. Useful for teams that want clear, accessible data-model docs inside their app.
composer require wizad/doctrine-doc-bundle
Register the bundle (Symfony 3 / early 4 style — this package predates Symfony 4 autoconfiguration):
// app/AppKernel.php
$bundles = [
// ...
new Wizad\DoctrineDocBundle\WizadDoctrineDocBundle(),
];
Import the bundle's routing so you get the browser UI:
# app/config/routing.yml
wizad_doctrine_doc:
resource: "@WizadDoctrineDocBundle/Resources/config/routing.yml"
prefix: /_doctrine-doc
Clear cache and hit /_doctrine-doc (check the actual route name in Resources/config/routing.yml — the prefix is yours to choose).
Where to look first:
Resources/config/routing.yml and the bundle's Controller/ — confirms the route and entry point.DependencyInjection/Configuration.php — this is the only reliable source of truth for available config keys (this bundle has minimal docs).First use case: point it at a small bundle of entities and use the generated page during an onboarding walkthrough or as living reference for a legacy schema. It reads Doctrine's ClassMetadataFactory, so anything mapped (relations, inversed sides, column types) renders without extra work.
Onboarding / schema documentation site. Mount the bundle under a firewall-protected path so only authenticated devs/staff can browse it. Because it reads live metadata, the docs never drift from code — unlike a hand-written ERD.
Per-environment exposure. Only register routing in config_dev.yml / config_test.yml, or gate the route behind an access_control rule. There is no built-in auth; it will happy render your entire schema to anyone who can reach it.
Pre-generation for static docs. If the bundle exposes a console command (check Command/), wire it into your build/deploy to emit HTML into a docs/ artifact for Confluence/staging. If no command exists, a small controller action that renders the bundle's Twig templates once and writes to disk is a common workaround.
Entity filtering. Configure which entity manager or namespaces are included via the bundle config (inspect Configuration.php for the exact key — likely something like wizad_doctrine_doc.entities or a manager selector). This matters on large apps where a single manager holds 300+ entities.
Template override. Copy the bundle's Resources/views/* into app/Resources/WizadDoctrineDocBundle/views/ (or templates/bundles/... on Symfony 4+) to rebrand the output or add columns. Twig bundle inheritance resolves the override automatically — no bundle class needed.
Pair with existing tooling. Use it as a "quick look" layer next to doctrine:mapping:info and doctrine:schema:validate; it complements rather than replaces them.
ClassNotFoundException for removed APIs (ContainerAwareCommand, @Route annotation loader changes). Patch by forking or shimming; do not expect upstream fixes.Configuration.php, the controller, and the Twig views as the actual documentation.ClassMetadata; Doctrine ORM 2.x → 3.x changed metadata APIs (e.g. typed collections, attribute mapping), so relation arrows can be wrong or the page can fatal. Pin Doctrine in a sandbox if you must run it.prod without a firewall. Schema leak = information disclosure (table names, column types, foreign keys).cache:clear and, if needed, doctrine:cache:clear-metadata before browsing.memory_limit for the dev environment only.doctrine:mapping:info should list them. A blank doc page almost always means an empty metadata collection, not a bundle bug.How can I help you explore Laravel packages today?