doctrine

doctrine/DoctrineBundle

PHP MIT Web Dev

Symfony Bundle for Doctrine ORM and DBAL

4.8k stars
482 forks
active
GitHub +3 / week

4.8k

Stars

482

Forks

36

Open issues

30

Contributors

3.2.4 09 Jun 2026

AI Analysis

DoctrineBundle integrates the Doctrine ORM and DBAL (Database Abstraction Layer) into the Symfony Framework, enabling PHP developers to work with databases through object-relational mapping and a powerful query language (DQL). It serves the specific use case of data persistence in Symfony applications and benefits Symfony developers building applications that require robust database abstraction and ORM capabilities. This is not a general-purpose tool but a framework-specific bridge for Symfon...

Web Dev Library Discovery value: 2/10
Documentation 8/10
Activity 9/10
Community 9/10
Code quality 8/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 8/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

symfony-integration orm database-abstraction php-persistence doctrine
Actively maintained Well documented MIT licensed Popular Production ready
Deep Analysis · Based on README and public signals
1w ago

Symfony's bridge to Doctrine ORM/DBAL — stable integration layer for PHP persistence

DoctrineBundle is the official integration layer between Symfony Framework and the Doctrine persistence libraries (ORM and DBAL). It provides configuration management, service registration, and CLI commands to make Doctrine accessible within Symfony applications. Used in production by thousands of Symfony projects, it remains the default database abstraction choice in Symfony. Not competing for dominance; rather, it *is* the standard pathway for Symfony developers to adopt Doctrine.

Origin

Created in 2011 as Symfony2 matured, DoctrineBundle codified the partnership between two major PHP ecosystem projects. It evolved alongside Symfony versions and became the canonical way to configure Doctrine within Symfony applications. Ownership remains within the Doctrine organization.

Growth

Initial adoption followed Symfony's growth through the 2010s. Star count growth has plateaued relative to the underlying Symfony and Doctrine libraries (both have higher star counts), reflecting maturity rather than decline. Recent activity remains steady: last push 2026-06-25, indicating active maintenance. Growth is now primarily driven by Symfony adoption patterns, not DoctrineBundle innovation.

In production

Adoption not formally quantified in README, but strong indirect evidence: (1) DoctrineBundle is the default database integration in official Symfony project templates; (2) Doctrine ORM (10,173 stars) and DBAL (9,703 stars) are among PHP's most widely adopted persistence libraries; (3) 4,836 stars and 482 forks indicate substantial real-world deployment; (4) active maintenance over 15 years suggests production reliance. Explicit end-user testimonials absent from README, but structural integration into Symfony ecosystem implies widespread adoption.

Code analysis
Architecture

Based on README, the bundle acts as a Symfony service container bridge, exposing Doctrine ORM EntityManager and DBAL Connection objects as services. Likely provides configuration parsing, entity discovery, and command registration. Architecture is purposefully thin — it delegates to Doctrine core libraries rather than duplicating logic.

Tests

README includes codecov badge, indicating active test coverage tracking. No specific percentage disclosed in truncated README, but presence of CI badge and codecov integration suggests coverage is monitored.

Maintenance

Last push 2026-06-25 (8 days before evaluation date) indicates recent activity. Project has CI/CD pipeline (GitHub Actions visible in badge). Star velocity is low (2 in 7 days) but this is consistent with a mature, stable library where most value comes from maintenance and bug fixes rather than new features. No signs of abandonment; appears to be sustainably maintained.

Honest verdict

ADOPT IF: you are building a Symfony application and need database persistence; Doctrine is the standard and DoctrineBundle is its official integration. AVOID IF: your project uses a different PHP framework (Laravel, Slim, etc.) where native ORMs or different integrations are standard, or if you require a lightweight persistence layer with minimal overhead. MONITOR IF: you are evaluating PHP ORMs in 2026 — Doctrine remains the enterprise-grade choice, but newer async-aware libraries or TypeScript-first frameworks may influence long-term ecosystem trajectory.

Independent dimensions

Mainstream potential

4/10

Technical importance

7/10

Adoption evidence

8/10

Risks
  • Heavy coupling to Symfony and Doctrine APIs creates lock-in; switching frameworks or ORMs requires significant refactoring.
  • Doctrine ORM performance (lazy-loading, N+1 query potential) has been debated for years; developers must learn query optimization discipline.
  • Configuration verbosity in Symfony can overwhelm beginners; learning curve is steeper than lightweight alternatives like Eloquent.
  • DoctrineBundle's maintenance depends on Doctrine and Symfony stability — breaking changes in either upstream project require coordinated updates.
  • Adoption of alternative ecosystems (e.g., growth of Node.js, Python web frameworks) reduces relative importance of this PHP-specific bundle.
Prediction

DoctrineBundle will remain Symfony's standard database integration for the foreseeable future. Activity will continue at a steady, maintenance-focused pace. Feature innovation will be limited; most development effort will address PHP version compatibility and upstream Doctrine/Symfony changes. No risk of abandonment, but also no expectation of major expansion.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

PHP
94.3%
Twig
5.7%

Information

Language
PHP
License
MIT
Last updated
2d ago
Created
178mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Similar repos

doctrine

doctrine/DoctrineMigrationsBundle

DoctrineMigrationsBundle integrates the Doctrine Migrations library into...

4.3k PHP Web Dev
doctrine

doctrine/DoctrineFixturesBundle

DoctrineFixturesBundle integrates Doctrine Data Fixtures into Symfony...

2.5k PHP Dev Tools
dmaicher

dmaicher/doctrine-test-bundle

This Symfony bundle optimizes test performance by wrapping database drivers to...

1.2k PHP Dev Tools
symfony

symfony/doctrine-bridge

The Doctrine Bridge is a PHP library that integrates the Doctrine ORM/ODM with...

3.2k PHP Web Dev
doctrine

doctrine/dbal

Doctrine DBAL is a mature database abstraction layer for PHP that provides a...

9.7k PHP Dev Tools
vs. alternatives
doctrine/orm (direct dependency)

DoctrineBundle does not compete with ORM — it wraps it. ORM is lower-level; the bundle adds Symfony integration.

doctrine/dbal (direct dependency)

Same relationship as ORM: DoctrineBundle exposes DBAL through Symfony's service container.

Eloquent (Laravel ORM)

Different ecosystem. Eloquent is Laravel's default; DoctrineBundle is Symfony's default. Not direct competitors — they serve separate framework communities.

Propel ORM

Historical competitor in PHP ORM space, but Doctrine/DoctrineBundle have dominated market share since ~2012. Propel adoption is minimal in contemporary projects.

Alternative frameworks' bundled ORMs

Some lightweight PHP frameworks ship custom ORMs or support multiple adapters. DoctrineBundle's advantage is tight Symfony integration and mature ecosystem.