PHPackages                             macpaw/behat-doctrine-fixtures - 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. macpaw/behat-doctrine-fixtures

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

macpaw/behat-doctrine-fixtures
==============================

Bundle for creating Doctrine fixtures

v3.0(2y ago)7251.6k↑58.3%3[4 issues](https://github.com/MacPaw/behat-doctrine-fixtures/issues)[3 PRs](https://github.com/MacPaw/behat-doctrine-fixtures/pulls)MITPHPPHP ^7.4 || ^8.0

Since Jan 13Pushed 1y ago2 watchersCompare

[ Source](https://github.com/MacPaw/behat-doctrine-fixtures)[ Packagist](https://packagist.org/packages/macpaw/behat-doctrine-fixtures)[ RSS](/packages/macpaw-behat-doctrine-fixtures/feed)WikiDiscussions develop Synced 3d ago

READMEChangelog (7)Dependencies (16)Versions (11)Used By (0)

Behat Doctrine Fixtures
=======================

[](#behat-doctrine-fixtures)

VersionBuild StatusCode Coverage`master`[![CI](https://github.com/macpaw/behat-doctrine-fixtures/workflows/CI/badge.svg?branch=master)](https://github.com/macpaw/behat-doctrine-fixtures/actions?query=workflow%3ACI+branch%3Amaster)[![Coverage Status](https://camo.githubusercontent.com/068327d5edc7435a6cc1319322555d5dcaeeb386bdd1505b5111007be361b87c/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6d61637061772f62656861742d646f637472696e652d66697874757265732f6d61737465723f6c6f676f3d636f6465636f76)](https://codecov.io/gh/macpaw/behat-doctrine-fixtures/branch/master)`develop`[![CI](https://github.com/macpaw/behat-doctrine-fixtures/workflows/CI/badge.svg?branch=develop)](https://github.com/macpaw/behat-doctrine-fixtures/actions?query=workflow%3ACI+branch%3Adevelop)[![Coverage Status](https://camo.githubusercontent.com/e87414bedbc636845cdd5ae880945c2856182b0d4f7b4bd80133bf4491887570/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6d61637061772f62656861742d646f637472696e652d66697874757265732f646576656c6f703f6c6f676f3d636f6465636f76)](https://codecov.io/gh/macpaw/behat-doctrine-fixtures/branch/develop)Installation
------------

[](#installation)

To install the Behat Doctrine Fixtures and integrate it with your Behat setup, follow the instructions provided in the [Installation Guide](docs/install.md).

Database Support
----------------

[](#database-support)

This library allows you to easily work with fixtures for testing in Behat using Doctrine. It supports two types of databases:

- [How to configure SQLite](docs/configure_sqlite.md) – a lightweight and fast database for testing.
- [How to configure PostgreSQL](docs/configure_postgre.md) – a powerful and popular relational database for production-like environments.
- [How multiple databases](docs/configure_multiple_databases.md) - To configure multiple databases, define separate connection settings for each database in your Doctrine configuration and reference them appropriately in your application.

How Usage in Behat
------------------

[](#how-usage-in-behat)

These methods can be used in Behat scenarios to load fixtures into the database, preparing test data for scenarios. For more detailed information on each method, refer to the links above.

### Methods

[](#methods)

#### [beforeScenario](docs/DatabaseContext/beforeScenario.md)

[](#beforescenario)

The `beforeScenario` method loads fixtures for all configured database connections before each Behat scenario. This ensures that the database is in a clean state before testing.

#### [loadFixturesForDefaultConnection](docs/DatabaseContext/loadFixturesForDefaultConnection.md)

[](#loadfixturesfordefaultconnection)

The `loadFixturesForDefaultConnection` method loads fixtures into the default database connection. It accepts a comma-separated list of fixture names and loads them into the default connection.

#### [loadFixturesForGivenConnection](docs/DatabaseContext/loadFixturesForGivenConnection.md)

[](#loadfixturesforgivenconnection)

The `loadFixturesForGivenConnection` method loads fixtures into a specified database connection. This method allows flexibility by letting you choose which database connection the fixtures should be loaded into, which is useful in multi-database environments.

Migrate from 1.x to 2.0
-----------------------

[](#migrate-from-1x-to-20)

[To migrate from 1.x to 2.0, follow our guide.](https://github.com/MacPaw/behat-doctrine-fixtures/blob/master/UPGRADE-2.0.md)

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~124 days

Total

8

Last Release

761d ago

Major Versions

v1.0.1 → v2.0.02022-05-17

v2.2.0 → v3.02024-06-04

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1935412?v=4)[MacPaw Inc.](/maintainers/macpaw)[@MacPaw](https://github.com/MacPaw)

![](https://www.gravatar.com/avatar/415a6c5f079859104abefc3592ee26337cfdb8466a98d1fadcd010072414523e?d=identicon)[Yozhef](/maintainers/Yozhef)

![](https://www.gravatar.com/avatar/d52c67d98f7c8c891f138e54370ee1d38b89d2be5e952eb4b586cdc69a6652eb?d=identicon)[igorgg](/maintainers/igorgg)

---

Top Contributors

[![IiiigorGG](https://avatars.githubusercontent.com/u/46721494?v=4)](https://github.com/IiiigorGG "IiiigorGG (51 commits)")[![Yozhef](https://avatars.githubusercontent.com/u/8971757?v=4)](https://github.com/Yozhef "Yozhef (45 commits)")[![serhiidonii](https://avatars.githubusercontent.com/u/158484424?v=4)](https://github.com/serhiidonii "serhiidonii (14 commits)")[![alekseytupichenkov](https://avatars.githubusercontent.com/u/8191991?v=4)](https://github.com/alekseytupichenkov "alekseytupichenkov (3 commits)")

---

Tags

backendbehatbehat-contextbehat-doctrine-contextdoctrine-fixturemacpawsymfonyFixtureBDDdoctrineContextBehatMacPaw

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/macpaw-behat-doctrine-fixtures/health.svg)

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M387](/packages/easycorp-easyadmin-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M204](/packages/sulu-sulu)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M737](/packages/sylius-sylius)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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