PHPackages                             tourze/doctrine-entity-markdown-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. tourze/doctrine-entity-markdown-bundle

ActiveLibrary[Database &amp; ORM](/categories/database)

tourze/doctrine-entity-markdown-bundle
======================================

基于 Doctrine 实体生成数据库字典的 Symfony Bundle

1.0.1(4mo ago)01191MITPHPCI passing

Since Mar 29Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/tourze/doctrine-entity-markdown-bundle)[ Packagist](https://packagist.org/packages/tourze/doctrine-entity-markdown-bundle)[ RSS](/packages/tourze-doctrine-entity-markdown-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (17)Versions (7)Used By (1)

Doctrine Entity Markdown Bundle
===============================

[](#doctrine-entity-markdown-bundle)

[English](README.md) | [中文](README.zh-CN.md)

[![Latest Version](https://camo.githubusercontent.com/675de8780558a8ab0d7be589a04b4c29e48b1d559a065a690f1e8c56187473a2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f75727a652f646f637472696e652d656e746974792d6d61726b646f776e2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/doctrine-entity-markdown-bundle)[![PHP Version](https://camo.githubusercontent.com/cc9cdea9aa96b40a822425e981b0a030e3371202973c7d57b74e8e99834f81dc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e312d626c7565)](https://php.net)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](LICENSE)![Build Status](https://camo.githubusercontent.com/b0c6c6845a74cb65a7f0a32bdcfd8fbf80eeb40026c4029af424ab371c94b8bd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275696c642d70617373696e672d627269676874677265656e)![Code Coverage](https://camo.githubusercontent.com/32855e94577df9d0a30995653b17d33a5fbfdf644518f96ea0374313397d19b7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d3130302532352d627269676874677265656e)

A Symfony Bundle for generating Markdown format database dictionaries from Doctrine entities.

Features
--------

[](#features)

- Generate complete database table listings
- Generate detailed field information for each table including field types, length, nullable status, default values, comments, etc.
- Handle associations between entities
- Support MCP (Model Context Protocol) tool integration for AI assistants

Installation
------------

[](#installation)

```
composer require tourze/doctrine-entity-markdown-bundle
```

Configuration
-------------

[](#configuration)

Add the bundle to your `config/bundles.php`:

```
return [
    // ...
    Tourze\DoctrineEntityMarkdownBundle\DoctrineEntityMarkdownBundle::class => ['all' => true],
];
```

Requirements
------------

[](#requirements)

This package requires the following components:

- PHP ^8.1
- Symfony ^7.3
- Doctrine ORM ^3.0
- Doctrine Bundle ^2.13

Quick Start
-----------

[](#quick-start)

### Command Line Usage

[](#command-line-usage)

Generate Markdown format database dictionary using the following command:

```
bin/console doctrine:generate:markdown
```

### Usage in Code

[](#usage-in-code)

```
use Tourze\DoctrineEntityMarkdownBundle\Service\EntityServiceInterface;

class YourController
{
    public function __construct(
        private readonly EntityServiceInterface $entityService,
    ) {
    }

    public function generateDictionary()
    {
        // Get all table names
        $tableList = $this->entityService->getAllTableNames();

        // Get metadata for a specific entity
        $userMetadata = $this->entityService->getEntityMetadata('App\Entity\User');

        // Get metadata for all entities
        $allMetadata = $this->entityService->getAllEntitiesMetadata();

        // Generate complete database dictionary
        $fullMarkdown = $this->entityService->generateDatabaseMarkdown();
    }
}
```

Advanced Usage
--------------

[](#advanced-usage)

### MCP Tool Integration

[](#mcp-tool-integration)

This package provides MCP (Model Context Protocol) tools for AI assistant integration:

```
use Tourze\DoctrineEntityMarkdownBundle\MCP\Tool\GetDatabaseDictionary;

// Get database dictionary through MCP
$tool = new GetDatabaseDictionary($entityService);
$result = $tool->execute();
```

### Custom Output Format

[](#custom-output-format)

You can extend the `EntityService` class to customize the output format:

```
class CustomEntityService extends EntityService
{
    public function generateCustomMarkdown(): string
    {
        // Custom generation logic
        return $this->generateDatabaseMarkdown();
    }
}
```

Testing
-------

[](#testing)

Run unit tests:

```
./vendor/bin/phpunit packages/doctrine-entity-markdown-bundle/tests
```

Contributing
------------

[](#contributing)

Please feel free to submit issues and pull requests. Make sure to follow the existing code style and add tests for any new functionality.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details.

###  Health Score

36

—

LowBetter than 81% of packages

Maintenance79

Regular maintenance activity

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~53 days

Recently: every ~66 days

Total

6

Last Release

141d ago

Major Versions

0.0.4 → 1.0.02025-11-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/e354fdb316da535dfa8ba2e9193a473c403b6bc6fb9170778d1dc50e304c6e9d?d=identicon)[tourze](/maintainers/tourze)

---

Top Contributors

[![tourze](https://avatars.githubusercontent.com/u/13899502?v=4)](https://github.com/tourze "tourze (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tourze-doctrine-entity-markdown-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/tourze-doctrine-entity-markdown-bundle/health.svg)](https://phpackages.com/packages/tourze-doctrine-entity-markdown-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M308](/packages/easycorp-easyadmin-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
