DoctrineMigrationsBundle

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

Library
Composer
v4.0.1
4,300 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
63 /100 Good
Development Activity 52
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

761

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

View details
76
Repo Health
66
Technical
65
Dependency
Built with
PHP 63%
Vue 18%
Gherkin 13%
Updated 2 weeks ago
PHP
63%
AGPL 3.0

Hyvor Relay

AI Development · Devops · Monitoring

908

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
68
Repo Health
79
Technical
70
Dependency
Built with
PHP 63%
Svelte 23%
Go 11%
Updated 1 weeks ago
PHP
86%
AGPL 3.0

Kimai

Invoicing Finance · Project Management

5,046

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 86%
Updated 5 days ago
PHP
82%
Other

Mautic

Automation · Ecommerce · Marketing

10,570

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

View details
97
Repo Health
76
Technical
63
Dependency
Built with
PHP 82%
Updated 1 weeks ago
PHP
84%
MIT

wallabag

Bookmarks Archiving

12,989

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
59
Dependency
Built with
PHP 84%
Twig 13%
Updated 5 days ago

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