# doctrine/mongodb-odm

The Official PHP MongoDB ORM/ODM

Repository: https://github.com/doctrine/mongodb-odm
Canonical: https://ross.abutalabs.com/products/mongodb-odm
Homepage: https://www.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/
Language: PHP
License: MIT
License Family: permissive
Topics: mongodb, odm, orm, php, symfony
Last push: 2026-08-25T19:17:13+00:00

## Health v2 (maintenance only)
Score: 97/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 92, longevity 100
- inputs: {"age_days": 5949, "days_push": 8, "days_rel": 55, "gap_med": 14, "n_releases_24m": 28}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1094, forks 508 (observed 2026-08-28T04:03:33.990953+00:00)

## What it is
Doctrine MongoDB ODM is the official PHP object document mapper for MongoDB, mapping PHP classes to MongoDB documents with support for embedded and referenced documents. It provides a query builder, aggregation framework support, schema and index management, GridFS file storage, and an event system.

## Use cases
- map PHP objects to MongoDB documents
- persist a domain model in MongoDB from a PHP or Symfony app
- manage MongoDB indexes and schema from PHP code
- store large files in MongoDB with GridFS
- build complex MongoDB queries with a fluent query builder
- mix SQL and MongoDB data with Doctrine ORM integration

## When to choose
- you build PHP or Symfony applications backed by MongoDB and want an object-oriented data layer
- you want document mapping, repositories, and lifecycle events instead of raw driver code
- you need GridFS file storage or aggregation pipelines from PHP objects

## When to avoid
- you use a relational database and need Doctrine ORM instead
- you prefer lightweight raw MongoDB driver access without mapping overhead
- your project is not PHP

## Facets
- artifact type: library
- maturity: active
- function: orm, database-driver, database
- domain: databases, backend, web-development
- platform: php
- tags: mongodb, odm, doctrine, symfony, gridfs, data-mapping, web-server

## Member repositories
- doctrine/mongodb-odm (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:33.990953+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:47:36.310759+00:00, confidence not recorded.
  - readme: https://github.com/doctrine/mongodb-odm (fetched 2026-08-28T04:03:33.990953+00:00, sha e8c5aa82d099)
  - homepage: https://www.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/ (fetched 2026-08-29T12:50:31.804718+00:00, sha 11f5ea97b4db)
  - site_page: https://www.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/tutorials/getting-started.html (fetched 2026-08-29T12:50:31.807142+00:00, sha ff4a3a8ed25b)
  - site_page: https://www.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/reference/introduction.html (fetched 2026-08-29T12:50:31.809192+00:00, sha 96796297ed0a)
  - site_page: https://www.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/reference/storing-files-with-gridfs.html (fetched 2026-08-29T12:50:31.811038+00:00, sha c02f494ab9cf)
- Data as of 2026-08-30T08:39:29.467469+00:00.
