# doctrine/persistence

The Doctrine Persistence project is a library that provides common abstractions for object mapper persistence.

Repository: https://github.com/doctrine/persistence
Canonical: https://ross.abutalabs.com/products/persistence
Homepage: https://www.doctrine-project.org/projects/persistence.html
Language: PHP
License: MIT
License Family: permissive
Topics: persistence, hacktoberfest
Last push: 2026-06-18T16:21:15+00:00

## Health v2 (maintenance only)
Score: 91/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 88, release rhythm 89, longevity 100
- inputs: {"age_days": 3010, "days_push": 76, "days_rel": 76, "gap_med": 4, "n_releases_24m": 12}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4045, forks 74 (observed 2026-08-28T04:08:33.586091+00:00)

## What it is
Doctrine Persistence is a PHP library providing common interfaces and abstractions shared by Doctrine's object mappers (ORM, ODM, etc.). It defines contracts for object managers, repositories, and persistence operations rather than implementing storage itself.

## Use cases
- decouple application code from a specific Doctrine object mapper implementation
- type-hint against stable persistence interfaces in PHP libraries
- build custom object mappers compatible with the Doctrine ecosystem
- swap between Doctrine ORM and MongoDB ODM without changing persistence code
- write framework integrations that support any Doctrine mapper

## When to choose
- you are building a PHP library that should work with any Doctrine object mapper
- you need stable interfaces for object persistence instead of concrete ORM dependencies
- you are developing a custom Doctrine-compatible mapper or integration

## When to avoid
- you need an actual working ORM with query building and database drivers - use Doctrine ORM instead
- your project does not use Doctrine or its ecosystem
- you want a standalone persistence solution with no Doctrine dependency

## Facets
- artifact type: library
- maturity: stable
- function: orm, database, serialization, sdk
- domain: databases, developer-tools, backend
- platform: php, cross-platform
- tags: persistence, object-mapper, interfaces, doctrine, abstraction-layer, php

## Member repositories
- doctrine/persistence (main) score 91

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:33.586091+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-29T18:23:43.869255+00:00, confidence not recorded.
  - readme: https://github.com/doctrine/persistence (fetched 2026-08-28T04:08:33.586091+00:00, sha 6269103dab77)
  - homepage: https://www.doctrine-project.org/projects/persistence.html (fetched 2026-08-29T09:16:14.016179+00:00, sha 01d7e2dd1bd2)
  - site_page: https://www.doctrine-project.org/projects/doctrine-persistence/en/4.2/index.html (fetched 2026-08-29T09:16:14.060674+00:00, sha 654196f434c1)
  - site_page: https://www.doctrine-project.org/projects/doctrine-persistence/en/latest/index.html (fetched 2026-08-29T09:16:14.072541+00:00, sha d99051b4994d)
  - site_page: https://www.doctrine-project.org/projects/doctrine-persistence/en/4.3/index.html (fetched 2026-08-29T09:16:14.074673+00:00, sha dd27dc120560)
  - site_page: https://www.doctrine-project.org/projects/doctrine-persistence/en/4.1/index.html (fetched 2026-08-29T09:16:14.076310+00:00, sha f96b75a2db8e)
  - site_page: https://www.doctrine-project.org/projects/doctrine-persistence/en/4.0/index.html (fetched 2026-08-29T09:16:14.077884+00:00, sha 64894b900d58)
  - site_page: https://www.doctrine-project.org/projects/doctrine-persistence/en/3.4/index.html (fetched 2026-08-29T09:16:14.079448+00:00, sha 7f529dc81070)
  - site_page: https://www.doctrine-project.org/projects/doctrine-persistence/en/3.3/index.html (fetched 2026-08-29T09:16:14.081024+00:00, sha 6a6cc81f1490)
  - site_page: https://www.doctrine-project.org/projects/doctrine-persistence/en/3.2/index.html (fetched 2026-08-29T09:16:14.082840+00:00, sha 904abe24191e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
