PHPackages                             cyberrebell/doctrine-db-patcher - 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. cyberrebell/doctrine-db-patcher

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

cyberrebell/doctrine-db-patcher
===============================

Doctrine-DB-Patcher

022PHP

Since Jun 20Pushed 11y ago2 watchersCompare

[ Source](https://github.com/Cyberrebell/doctrine-db-patcher)[ Packagist](https://packagist.org/packages/cyberrebell/doctrine-db-patcher)[ RSS](/packages/cyberrebell-doctrine-db-patcher/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

\##doctrine-db-patcher Gives your ZF2+Doctrine-Project a toolset for database-patches.

===================

\###DoctrineDbPatcher

\####Requirents: php &gt;=5.4

ZF2:

DoctrineMongoODMModule:

or

DoctrineORMModule:

\####Installation via composer: add to composer.json:

```
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/Cyberrebell/doctrine-db-patcher"
        }
    ],
    "require": {
        "Cyberrebell/doctrine-db-patcher": "dev-master"
    },
```

\####Configuration in project: add to application.config.php:

```
return [
    'modules' => [
        'DoctrineDbPatcher'
    ]
];
```

add to any module.config.php:

```
return [
    'DoctrineDbPatcher' => [
        'doctrine-objectmanager-service' => 'Doctrine\ODM\Mongo\DocumentManager', //or Doctrine\ORM\EntityManager
        'patches' => include 'doctrine.patches.php'
    ]
];
```

create doctrine.patches.php and add your patches like this:

```
 [
        'insert' => [
            'User\Entity\Resource' => [
                'attributes' => ['route'],
                'values' => [
                    ['login'],
                    ['logout'],
                ]
            ],
            'User\Entity\Permission' => [
                'attributes' => ['description'],
                'values' => [
                    ['Sich einloggen'],
                    ['Sich ausloggen'],
                ]
            ],
        ],
        'update' => [
             'User\Entity\Guestbook' => [
                 [
                     'attributes' => ['title'],
                     'values' => [
                         ['old' => ['This is a niec website'], 'new' => ['This is a nice website']],
                     ]
                 ],
             ],
        ],
        'delete' => [
             'User\Entity\Guestbook' => [
                 [
                     'attributes' => ['title'],
                     'values' => [
                         ['Hello everyone'],
                     ]
                 ],
             ],
        ],
        'connect' => [
            [
                'entities' => ['User\Entity\Permission' => 'User\Entity\Resource'],
                'methods' => ['addResource' => 'removeResource'],
                'targets' => [
                    ['source' => ['description' => 'Sich einloggen'], 'target' => ['route' => 'login']],
                    ['source' => ['description' => 'Sich ausloggen'], 'target' => ['route' => 'logout']],
                ]
            ]
        ]
    ]
];
```

\####Configuration in project: run the patch-tool:

```
php public/index.php dbpatch
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/815fa0d63de096078b094188ee4171277da9c7c9e3c27e7fe00a4ce9c75cb9ee?d=identicon)[Cyberrebell](/maintainers/Cyberrebell)

---

Top Contributors

[![Cyberrebell](https://avatars.githubusercontent.com/u/6728955?v=4)](https://github.com/Cyberrebell "Cyberrebell (21 commits)")

### Embed Badge

![Health badge](/badges/cyberrebell-doctrine-db-patcher/health.svg)

```
[![Health](https://phpackages.com/badges/cyberrebell-doctrine-db-patcher/health.svg)](https://phpackages.com/packages/cyberrebell-doctrine-db-patcher)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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