# dmaicher/doctrine-test-bundle

Symfony bundle to isolate your app's doctrine database tests and improve the test performance

Repository: https://github.com/dmaicher/doctrine-test-bundle
Canonical: https://ross.abutalabs.com/products/doctrine-test-bundle
Language: PHP
License: MIT
License Family: permissive
Topics: symfony, symfony-bundle, isolated-tests, phpunit-listener, doctrine2, php, phpunit
Last push: 2026-06-09T13:24:56+00:00

## Health v2 (maintenance only)
Score: 78/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 86, release rhythm 54, longevity 100
- inputs: {"age_days": 3821, "days_push": 85, "days_rel": 224, "gap_med": 41, "n_releases_24m": 8}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1189, forks 61 (observed 2026-08-28T04:03:55.754685+00:00)

## What it is
A Symfony bundle that isolates Doctrine database tests by wrapping DBAL drivers with a StaticDriver and using a PHPUnit extension to begin and roll back transactions around each test. It also configures a static array cache for metadata and queries to speed up and reduce memory usage of test suites.

## Use cases
- speed up symfony doctrine test suite
- isolate database tests with transaction rollback
- avoid rebuilding schema or fixtures before every test
- cache doctrine metadata between kernel boots in tests
- run phpunit tests against a shared database state safely

## When to choose
- you have a Symfony app using Doctrine DBAL/ORM and PHPUnit
- your test suite is slow due to schema rebuilds or fixture re-imports per test
- you want per-test database isolation without reseeding data

## When to avoid
- your tests rely on DDL statements that implicitly commit transactions
- you are not using Symfony or Doctrine DBAL
- you need tests to observe committed data across separate processes or connections

## Facets
- artifact type: library
- maturity: stable
- function: testing, database, orm
- domain: testing, web-development, databases, developer-tools
- platform: php, cli
- tags: symfony-bundle, doctrine, phpunit, transaction-rollback, test-isolation, test-performance

## Member repositories
- dmaicher/doctrine-test-bundle (main) score 78

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:55.754685+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:23:08.681772+00:00, confidence not recorded.
  - readme: https://github.com/dmaicher/doctrine-test-bundle (fetched 2026-08-28T04:03:55.754685+00:00, sha ddb1463a4398)
- Data as of 2026-08-30T08:39:29.467469+00:00.
