DoctrineMigrationsBundle

Symfony bundle that integrates the Doctrine Migrations library for versioned database schema changes

Library
Composer
v4.0.1
4,298 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
61 /100 Good
Development Activity 44
Maintenance 36
Community 64
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
73 /100 Good
Architecture 75
Code Quality 76
Innovation 62
Learning Curve 80

DoctrineMigrationsBundle wires the standalone doctrine/migrations library into a Symfony application’s dependency-injection container, configuration system, and console. It lets teams version their database schema as ordered PHP migration classes and apply, revert, or diff those changes predictably across every environment the application runs in, instead of hand-editing schemas or relying on ORM auto-sync in production.

What You Get

  • Symfony console commands for generating, running, reverting, and diffing database migrations
  • DI container integration so migrations have access to the app’s configured Doctrine DBAL connections and entity managers
  • Bundle-level YAML/PHP configuration (doctrine_migrations:) for migration paths, namespaces, and storage table naming
  • A MigrationsRepository abstraction and event listeners for hooking into the migration lifecycle
  • Support for multiple named migration sets/connections in a single application

Common Use Cases

  • Versioning database schema changes in a Symfony application so every environment (dev, staging, production) applies the same ordered set of changes
  • Generating a migration automatically from the diff between the current database schema and Doctrine entity mappings
  • Running migrations as part of a deployment pipeline (doctrine:migrations:migrate --no-interaction) to keep production schema in sync with code
  • Rolling back a bad schema change in production by reverting to a specific prior migration version

Under The Hood

Architecture — The bundle is a thin Symfony integration layer: DoctrineMigrationsBundle.php registers the bundle with Symfony’s kernel, DependencyInjection/ contains the configuration tree and compiler pass that binds doctrine/migrations’ DependencyFactory into Symfony’s container, and EventListener/ hooks migration events (e.g. schema-change notifications) into Symfony’s event dispatcher; config/services.php wires the concrete service definitions. Tech Stack — PHP 8.4+, requiring doctrine/migrations ^3.2, doctrine/dbal ^4, doctrine/doctrine-bundle ^3, and Symfony components (config, console, dependency-injection, framework-bundle) ^6.4/^7/^8, with a small Twig-templated Collector for the Symfony profiler/web debug toolbar. Code Quality — The project runs PHPStan (phpstan.neon.dist) and PHP_CodeSniffer (phpcs.xml.dist) in CI, plus a tests/ suite exercising the DI configuration and event listeners; a SECURITY.md documents the vulnerability-reporting process. API Design — Configuration follows standard Symfony bundle conventions (a single doctrine_migrations: config key, auto-registered console commands), so a developer already familiar with Symfony bundles or Doctrine ORM has almost no new concepts to learn beyond the underlying doctrine/migrations command set.

Used by 5 apps in this directory

PHP
63%
Other

BillaBear

Ecommerce · Invoicing Finance

760

Self-hostable subscription management and billing platform with Stripe integration, tax automation, configurable workflows, and Twig-based document generation.

View details
73
Repo Health
66
Technical
65
Dependency
Built with
PHP 63%
Vue 18%
Gherkin 13%
Updated 1 months ago
PHP
60%
AGPL 3.0

Hyvor Relay

AI Development · Devops · Monitoring

918

Self-hosted, open-source email API that automates DNS, manages SMTP delivery, and provides deep observability — replacing SES, Mailgun, and SendGrid with infrastructure you fully own.

View details
69
Repo Health
79
Technical
71
Dependency
Built with
PHP 60%
Svelte 22%
Go 16%
Updated 3 days ago
PHP
87%
AGPL 3.0

Kimai

Invoicing Finance · Project Management

5,095

Professional open-source time tracking with invoicing, multi-user support, SAML/LDAP auth, and a full REST API—self-host it or use the cloud.

View details
94
Repo Health
78
Technical
64
Dependency
Built with
PHP 87%
Updated today
PHP
81%
Other

Mautic

Automation · Ecommerce · Marketing

10,830

The world's largest open source marketing automation platform — own your data, run multi-channel campaigns, and escape vendor lock-in forever.

View details
98
Repo Health
76
Technical
63
Dependency
Built with
PHP 81%
Updated yesterday
PHP
84%
MIT

wallabag

Bookmarks Archiving

13,023

Self-hosted read-it-later app that saves clean, ad-free articles from any webpage for distraction-free reading across all your devices.

View details
93
Repo Health
81
Technical
60
Dependency
Built with
PHP 84%
Twig 13%
Updated yesterday

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers