问题
I generated all entities in my symfony projects,can I have any idea or solution or software to create or regenerate a UML schema from doctrine entity generated on my project(xml or yml).
回答1:
Using free tools, a way to do is to use the command
phpuml -x 1 -o C:\symfony\httpfoundation.xmi C:\symfony\vendor\symfony\src\Symfony\Component\HttpFoundation
(this is a sample for generating the schema from symfony source code)
Then using BoUml Viewer or ArgoUML for viewing the generated file.
I tried other way to do it but none was giving good results...
The best way I found (and I use) is to do it with Sparx Systems - Enterprise Architect, but you have to pay for it :(
Anyway, if you find another working way to do it, I'm quite interested :)
Best regards, Christophe
回答2:
So to resolve that,I'm using visual paradigm for uml,this software is not for free it needs activation key.But it offers a connection directly to your database,just follow "tools => database => reverse Database,then you create your "Entity Relationship Diagram",finally just you click with right button of your mouse on the page of ERD and choose "synchronize to class diagram" and automatically you will have your class diagram,finally you can just add your setter and getter,also you can export it to a lot of kind of format(XML,Xls...).
回答3:
Check out ORM Designer. It can do exactly what you need, if you don't mind its paid software. And you can use it to edit schemas for your projects in visual environment and generate your XML/YML definitions from the visual schema.
回答4:
Look at this solution: https://packagist.org/packages/onurb/doctrine-yuml-bundle
It's a symfony bundle that will offer you the console command
bin/console yuml:mappings
and will write an image yuml-mapping.png
.
来源:https://stackoverflow.com/questions/12096203/create-or-build-uml-schema-from-doctrine-entity-yml-or-xml-in-symfony2