PHPackages                             hackzilla/doctrine-migration-pruner-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. hackzilla/doctrine-migration-pruner-bundle

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

hackzilla/doctrine-migration-pruner-bundle
==========================================

Prune excess doctrine migrations

0.4(1y ago)23.7k↓50%MITPHP

Since Oct 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/hackzilla/DoctrineMigrationPrunerBundle)[ Packagist](https://packagist.org/packages/hackzilla/doctrine-migration-pruner-bundle)[ RSS](/packages/hackzilla-doctrine-migration-pruner-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

Doctrine Migration Pruner Bundle
================================

[](#doctrine-migration-pruner-bundle)

Features
--------

[](#features)

- Automatically prunes old migration files and their corresponding database entries just before running new Doctrine migrations.
- Designed to work in production; migration files should be absent, leaving only the database entries to be removed.
- Handles Doctrine migrations' multiple configurations.
- Prevents warnings about missing migration files if you manually removed them.

### Supported Platforms

[](#supported-platforms)

- MySQL
- Sqlite

Prerequisites
-------------

[](#prerequisites)

- Requires Doctrine Migration Bundle.
- Tested on Symfony 6, but should work wherever Doctrine Migrations Bundle v3.\* is compatible.

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

[](#installation)

To install the Doctrine Migration Pruner Bundle, you can use composer:

```
composer require hackzilla/doctrine-migration-pruner-bundle
```

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

[](#configuration)

Add the following to your application's config:

```
hackzilla_doctrine_migration_pruner:
  remove_migrations_before: '2007-05-01'  # Can be null or a valid date-time
```

It's advisable to start with an earlier date-time.

Usage
-----

[](#usage)

Run your Doctrine migrations as you normally would:

```
bin/console doctrine:migrations:migrate
```

Note: The pruning operation will not execute if the `--dry-run` option has been specified.

Testing
-------

[](#testing)

There are currently no tests available.

However, you can use [Doctrine Migration Pruner Repo](https://github.com/hackzilla/DoctrineMigrationPruner) to test the migration pruning.

Contributions and Issues
------------------------

[](#contributions-and-issues)

See all contributors on [GitHub](https://github.com/hackzilla/DoctrineMigrationPrunerBundle/graphs/contributors).

Please report issues using GitHub's issue tracker: [GitHub Repo](https://github.com/hackzilla/DoctrineMigrationPrunerBundle)

If you find this project useful, consider [buying me a coffee](https://www.buymeacoffee.com/hackzilla).

License
-------

[](#license)

This bundle is released under the MIT license. See the [LICENSE](https://github.com/hackzilla/DoctrineMigrationPrunerBundle/blob/main/LICENSE) file for details.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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 ~88 days

Total

5

Last Release

582d ago

### Community

Maintainers

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

---

Top Contributors

[![hackzilla](https://avatars.githubusercontent.com/u/1474182?v=4)](https://github.com/hackzilla "hackzilla (12 commits)")

### Embed Badge

![Health badge](/badges/hackzilla-doctrine-migration-pruner-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/hackzilla-doctrine-migration-pruner-bundle/health.svg)](https://phpackages.com/packages/hackzilla-doctrine-migration-pruner-bundle)
```

###  Alternatives

[symfony/orm-pack

A pack for the Doctrine ORM

1.8k35.4M362](/packages/symfony-orm-pack)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[bolt/core

🧿 Bolt Core

585142.5k54](/packages/bolt-core)[sylius-labs/doctrine-migrations-extra-bundle

226.6M9](/packages/sylius-labs-doctrine-migrations-extra-bundle)[hakam/multi-tenancy-bundle

Flexible and production-ready multi-tenancy bundle for Symfony.

12439.6k](/packages/hakam-multi-tenancy-bundle)

PHPackages © 2026

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