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 Doc Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Getting Started

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:

  1. Resources/config/routing.yml and the bundle's Controller/ — confirms the route and entry point.
  2. The bundle DependencyInjection/Configuration.php — this is the only reliable source of truth for available config keys (this bundle has minimal docs).
  3. Your Doctrine mapping (annotations/XML/YAML) — the output is only as good as your metadata.

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.

Implementation Patterns

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.

Gotchas and Tips

  • Stale by age. Last meaningful activity is Symfony 2/3-era. On Symfony 5+ expect ClassNotFoundException for removed APIs (ContainerAwareCommand, @Route annotation loader changes). Patch by forking or shimming; do not expect upstream fixes.
  • Only 14 stars, zero dependents. No community, no issue triage. Budget time to read the source — treat Configuration.php, the controller, and the Twig views as the actual documentation.
  • Doctrine version coupling. It parses 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.
  • No auth, exposes internals. Never mount the route in prod without a firewall. Schema leak = information disclosure (table names, column types, foreign keys).
  • Proxy / lazy-loading entities can appear with mangled names if the metadata factory hasn't been warmed. Run cache:clear and, if needed, doctrine:cache:clear-metadata before browsing.
  • Large schemas render slowly. The UI builds the full graph in one request; on 200+ entities you'll hit memory/time limits. Limit to one entity manager via config, or raise memory_limit for the dev environment only.
  • Extension points are Twig templates + config, not services. If you need custom behavior (e.g. annotating fields with business meaning), override the controller in your own bundle by aliasing the route and copying the render logic — safer than monkeypatching vendor code.
  • Debug path. If the page is blank, check that your entities are actually discovered: doctrine:mapping:info should list them. A blank doc page almost always means an empty metadata collection, not a bundle bug.
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.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels