janalis / doctrineviz
渲染 Doctrine2 映射数据库的图形表示
v0.3.1
2017-11-30 22:15 UTC
Requires
- php: >=7.1
Requires (Dev)
- doctrine/doctrine-bundle: ^1.6
- doctrine/orm: ^2.5
- incenteev/composer-parameter-handler: ^2.1
- phpunit/phpunit: ^6.2
- satooshi/php-coveralls: ^1.0
- symfony/monolog-bundle: ^3.1.0
- symfony/phpunit-bridge: ^3.0
- symfony/symfony: ^3.4
README
渲染 Doctrine2 映射数据库的图形表示。
示例
安装
通过 composer 需求包
$ composer require --dev janalis/doctrineviz
然后,在项目的 app/AppKernel.php
文件中添加以下行以启用该包
// app/AppKernel.php class AppKernel extends Kernel { public function registerBundles() { //... if (in_array($this->getEnvironment(), ['dev', 'test'])) { // ... // Because the vendor code could be not present, you should check if the bundle is here before using it. new Janalis\Doctrineviz\DoctrinevizBundle(), } // ... } // ... }
为了能够使用图形绘制功能,您必须安装 GraphViz (dot 可执行文件)。
Mac OS
$ brew install graphviz
Ubuntu
$ sudo apt install -y graphviz
Windows
Windows 用户可以从此处下载 GraphViZ for Windows。
使用方法
在 symfony 项目中
$ php app/console doctrine:generate:viz --help