PHPackages                             takeit/doctrine-data-fixtures-extension - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. takeit/doctrine-data-fixtures-extension

ActiveLibrary[Database &amp; ORM](/categories/database)

takeit/doctrine-data-fixtures-extension
=======================================

Doctrine data fixtures extension for Behat

v5.0.1(7y ago)110.1kMITPHPPHP ^7.1

Since Aug 6Pushed 6y ago1 watchersCompare

[ Source](https://github.com/takeit/DoctrineDataFixturesExtension)[ Packagist](https://packagist.org/packages/takeit/doctrine-data-fixtures-extension)[ Docs](http://github.com/BehatExtension/)[ RSS](/packages/takeit-doctrine-data-fixtures-extension/feed)WikiDiscussions v5.0 Synced today

READMEChangelogDependencies (9)Versions (39)Used By (0)

Doctrine Fixtures Extension for Behat
=====================================

[](#doctrine-fixtures-extension-for-behat)

The extension increases feature test isolation by reloading ORM data fixtures between scenarios and features.

Installation
============

[](#installation)

```
composer require "behat-extension/doctrine-data-fixtures-extension"
```

Configuration
=============

[](#configuration)

Activate extension in your **behat.yml** and define any fixtures to be loaded:

```
# behat.yml
default:
  # ...
  extensions:
    BehatExtension\DoctrineDataFixturesExtension\Extension:
      lifetime:    'feature'
      autoload:    true
      directories: ~
      fixtures:    ~
```

When **lifetime** is set to "feature" (or unspecified), data fixtures are reloaded between feature files. Alternately, when **lifetime** is set to "scenario", data fixtures are reloaded between scenarios (i.e., increased test isolation at the expense of increased run time).

When **autoload** is true, the extension will load the data fixtures for registered bundles. Please note that only fixtures stored in the folder `/DataFixtures/ORM` of the bundles are loaded. If you want to load fixtures tagged with `doctrine.fixture.orm`, you must enable the bundle `BehatExtension\DoctrineDataFixturesExtension\Bundle\BehatDoctrineDataFixturesExtensionBundle`in your test `AppKernel` class.

When **fixtures** is set, the DoctrineDataFixtures extension will load the specified fixture classes.

When **directories** is set, the DoctrineDataFixtures extension will load the data fixtures globed from the respective directories.

```
# behat.yml
default:
  # ...
  extensions:
    BehatExtension\DoctrineDataFixturesExtension\Extension:
      lifetime: 'feature'
      autoload: true
      directories:
        - '/project/src/AcmeAnalytics/Tests/DataFixtures/ORM'
      fixtures:
        - 'Acme\StoreBundle\DataFixture\ORM\Categories'
        - 'Acme\StoreBundle\DataFixture\ORM\Apps'
        - 'Acme\VendorBundle\DataFixture\ORM\Vendors'
```

Backup System
=============

[](#backup-system)

To speed up the tests, a backup system is available. The whole database will be set in cache and reloaded when needed. You should periodically clear the cache as it does not detect changes to the data fixture contents because the hash is based on the collection of data fixture class names.

This feature is only available for the following SGDB: SQLite, MySQL, PostgreSQL.

It is enabled by default. To disable it, you just have to set `use_backup: false` in the extension configuration:

```
# behat.yml
default:
  # ...
  extensions:
    BehatExtension\DoctrineDataFixturesExtension\Extension:
      lifetime: 'feature'
      autoload: true
      use_backup: false
```

Source
======

[](#source)

Github:

Forked from

Copyright
=========

[](#copyright)

- Copyright (c) 2012 Anthon Pang.
- Copyright (c) 2016-2018 Florent Morselli.

See [LICENSE](LICENSE) for details.

Contributors
============

[](#contributors)

- Anthon Pang ([robocoder](http://github.com/robocoder))
- Florent Morselli ([Spomky](http://github.com/Spomky))
- [Others contributors](https://github.com/BehatExtension/DoctrineDataFixturesExtension/graphs/contributors)

###  Health Score

36

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 77.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~71 days

Recently: every ~98 days

Total

35

Last Release

2544d ago

Major Versions

0.10.3 → 2.5.02014-02-04

2.5.6 → 3.0.02015-10-06

3.0.0 → v4.0.02016-04-26

v4.0.x-dev → v5.0.02018-03-09

PHP version history (2 changes)v0.9PHP &gt;=5.3.6

v5.0.0PHP ^7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ec8ead198708d54817180228ce713f9d6f43f1fbfebbfa71271fe8fcae11dc6?d=identicon)[takeit](/maintainers/takeit)

---

Top Contributors

[![robocoder](https://avatars.githubusercontent.com/u/922051?v=4)](https://github.com/robocoder "robocoder (74 commits)")[![Spomky](https://avatars.githubusercontent.com/u/1091072?v=4)](https://github.com/Spomky "Spomky (5 commits)")[![takeit](https://avatars.githubusercontent.com/u/562536?v=4)](https://github.com/takeit "takeit (2 commits)")[![unframework](https://avatars.githubusercontent.com/u/784414?v=4)](https://github.com/unframework "unframework (2 commits)")[![coderbyheart](https://avatars.githubusercontent.com/u/188915?v=4)](https://github.com/coderbyheart "coderbyheart (2 commits)")[![rdohms](https://avatars.githubusercontent.com/u/94331?v=4)](https://github.com/rdohms "rdohms (2 commits)")[![ruudk](https://avatars.githubusercontent.com/u/104180?v=4)](https://github.com/ruudk "ruudk (2 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (2 commits)")[![WillFink](https://avatars.githubusercontent.com/u/7439185?v=4)](https://github.com/WillFink "WillFink (1 commits)")[![boekkooi](https://avatars.githubusercontent.com/u/399895?v=4)](https://github.com/boekkooi "boekkooi (1 commits)")[![cordoval](https://avatars.githubusercontent.com/u/328359?v=4)](https://github.com/cordoval "cordoval (1 commits)")[![guilhermeblanco](https://avatars.githubusercontent.com/u/208883?v=4)](https://github.com/guilhermeblanco "guilhermeblanco (1 commits)")[![adrienbrault](https://avatars.githubusercontent.com/u/611271?v=4)](https://github.com/adrienbrault "adrienbrault (1 commits)")

---

Tags

BDDdoctrineBehatData fixtures

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/takeit-doctrine-data-fixtures-extension/health.svg)

```
[![Health](https://phpackages.com/badges/takeit-doctrine-data-fixtures-extension/health.svg)](https://phpackages.com/packages/takeit-doctrine-data-fixtures-extension)
```

###  Alternatives

[behat-extension/doctrine-data-fixtures-extension

Doctrine data fixtures extension for Behat

20546.1k1](/packages/behat-extension-doctrine-data-fixtures-extension)[vipsoft/doctrine-data-fixtures-extension

Doctrine data fixtures extension for Behat

21294.6k14](/packages/vipsoft-doctrine-data-fixtures-extension)[knplabs/doctrine-behaviors

Doctrine Behavior Traits

93612.6M55](/packages/knplabs-doctrine-behaviors)[sonata-project/doctrine-orm-admin-bundle

Integrate Doctrine ORM into the SonataAdminBundle

44917.5M144](/packages/sonata-project-doctrine-orm-admin-bundle)[fresh/doctrine-enum-bundle

Provides support of ENUM type for Doctrine2 in Symfony applications.

4756.8M12](/packages/fresh-doctrine-enum-bundle)[michaeldegroot/doctrine-encrypt-bundle

Encrypted symfony entity's by verified and standardized libraries

1481.0M1](/packages/michaeldegroot-doctrine-encrypt-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
