Reputation: 166146
"Out of the box", does Doctrine have any support for creating a directed graph, UML or other visual representation of the entity relationships defined in the Doctrine configuration files? That is, if I'm working with an existing Symfony (or other MVC framework using doctrine) project, is there anything like
//pseudo code
$graph = $entityManager->generatedEntityDiagram();
file_put_contents('graph.dot', $graph);
If not, is there known science for doing something like this?
The specific problem I'm trying to solve is taking on an unfamiliar Symfony2 project, with many bundles, and getting a high level overview of the Doctrine object relationships so I can better understand the domain model of a project.
Upvotes: 2
Views: 4991
Reputation: 3430
Try https://github.com/jawira/doctrine-diagram-bundle it works with the latest PHP and Symfony (8.4 and 7.2) and earlier versions too.
Upvotes: 0
Reputation: 114
I know this subjet is extremely old... but symfony still doesn't have anything like that natively... But ! since you asked, I made a bundle which makes exactly what you needed ^^ compatible SF3 and SF4 :) it still might be usefull ;)
Sorry for the digging, I only see your question now :D
https://packagist.org/packages/onurb/doctrine-yuml-bundle
if you're not using symfony, you can use the metadataGrapher which is in a separate repo : https://packagist.org/packages/onurb/doctrine-metadata-grapher
Upvotes: 3
Reputation: 1730
check our Skipper tool for Doctrine project visual representation and also editing.
In case you would need only the visualisation, you can try Pulpo tool but depending on a project complexity Skipper will allow you to update visual diagram for better comprehensibility.
Upvotes: 3