Create or build UML schema from Doctrine entity yml or Xml in symfony2

青春壹個敷衍的年華 提交于 2020-01-13 19:08:41

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!