PHPackages                             theofidry/alice-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. theofidry/alice-fixtures-extension

Abandoned → [theofidry/alice-bundle-extension](/?search=theofidry%2Falice-bundle-extension)ArchivedLibrary[Database &amp; ORM](/categories/database)

theofidry/alice-fixtures-extension
==================================

Extension to load fixtures files with HautelookAliceBundle.

v1.3.1(9y ago)3610123[5 issues](https://github.com/theofidry/AliceBundleExtension/issues)[1 PRs](https://github.com/theofidry/AliceBundleExtension/pulls)MITPHPPHP &gt;=5.4.0

Since Aug 23Pushed 7y ago4 watchersCompare

[ Source](https://github.com/theofidry/AliceBundleExtension)[ Packagist](https://packagist.org/packages/theofidry/alice-fixtures-extension)[ RSS](/packages/theofidry-alice-fixtures-extension/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (14)Versions (10)Used By (0)

AliceBundleExtension
====================

[](#alicebundleextension)

A [Behat extension](http://behat.org) to load [HautelookAliceBundle](https://github.com/hautelook/AliceBundle) fixtures.

[![Package version](https://camo.githubusercontent.com/b82a887ab2af2e56f79a46a31304123220c3fcc1e0b21b73a2ec0660abb54d0d/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f7468656f66696472792f616c6963652d62756e646c652d657874656e73696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/theofidry/alice-bundle-extension)[![Build Status](https://camo.githubusercontent.com/cb00db8e9c93f49e39f1dbc68e063d6b377257ddd1e77a0861d36f7a28ac10bd/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7468656f66696472792f416c69636542756e646c65457874656e73696f6e2e7376673f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://travis-ci.org/theofidry/AliceBundleExtension?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/0369447bab56b67ea07396935c1fde0fa5b4fe718956e711cfccadbfdeb4d3bd/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f33613633336335332d613833642d343764342d616562352d6433363735616134383533642e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/3a633c53-a83d-47d4-aeb5-d3675aa4853d)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/c53cc0187ba2e91bf2663930f621254ffc525c85f5db00cc26076a811696d4fe/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7468656f66696472792f416c69636542756e646c65457874656e73696f6e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/theofidry/AliceBundleExtension/?branch=master)

Installation
------------

[](#installation)

You can use [Composer](https://getcomposer.org/) to install the bundle to your project:

```
composer require --dev theofidry/alice-bundle-extension
```

Then, in your behat config file `behat.yml`, register the extension and declare the context:

```
# behat.yml
default:
    suites:
        default:
            contexts:
                - Fidry\AliceBundleExtension\Context\Doctrine\AliceORMContext

                # or if you want to set the base path only for this context:
                - Fidry\AliceBundleExtension\Context\Doctrine\AliceORMContext:
                    basePath: %paths.base%/tests/Features/fixtures/ORM (default value)
    # ...
    extensions:
        Fidry\AliceBundleExtension\Extension:
            fixtures_base_path: ~ # default to %paths.base%/features/fixtures
```

You have three contexts available:

- `Fidry\AliceBundleExtension\Context\Doctrine\AliceODMContext`
- `Fidry\AliceBundleExtension\Context\Doctrine\AliceORMContext`
- `Fidry\AliceBundleExtension\Context\Doctrine\AlicePHPCRContext`

With the default fixtures basePath respectively at:

- `%paths.base%/tests/Features/fixtures/ODM`
- `%paths.base%/tests/Features/fixtures/ORM`
- `%paths.base%/tests/Features/fixtures/PHPCR`

Basic usage
-----------

[](#basic-usage)

Assuming you have the same configuration as the [Installation section](#Installation), you can create the following fixture file:

```
# features/fixtures/ORM/dummy.yml

AppBundle\Entity\Dummy:
    dummy_{1..10}:
        name:
```

Then simply load your fixtures with the following step:

```
Given the fixtures file "dummy.yml" is loaded
Given the fixtures file "dummy.yml" is loaded with the persister "doctrine.orm.entity_manager"
Given the following fixtures files are loaded:
  | fixtures1.yml |
  | fixtures2.yml |
```

Loading fixture parameters
--------------------------

[](#loading-fixture-parameters)

Fixture parameters can be loaded in the same way as loading fixtures. Any available step which loads fixtures, can also load parameters. You have to load your parameters before the dependend fixtures:

```
Given the fixtures file "parameters.yml" is loaded
And the fixtures file "dummy.yml" is loaded
```

Steps
-----

[](#steps)

For each context, you have the following steps available:

```
@Given the database is empty
@Then I empty the database

@Given the fixtures "fixturesFile" are loaded
@Given the fixtures file "fixturesFile" is loaded
@Given the fixtures "fixturesFile" are loaded with the persister "persister_service_id"
@Given the fixtures file "fixturesFile" is loaded with the persister "persister_service_id"
@Given the following fixtures files are loaded:
  | fixtures1.yml |
  | fixtures2.yml |
@Given the following fixtures files are loaded with the persister "persister_service_id":
  | fixtures1.yml |
  | fixtures2.yml |
```

Loading fixture files can be done as follows:

   Type of path Fixtures file path Computed fixtures file path     Relative path `"dummy.yml"` `contextBasePath/dummy.yml`, ex: `%paths.base%/tests/Features/fixtures/ORM/dummy.yml`   @Bundle path `"@AppBundle/DataFixtures/ORM/dummy.yml"` `src/AppBundle/DataFixtures/ORM/dummy.yml` (example)   Absolute path `/dummy.yml` unchanged   Absolute directory path `/tests/Features/fixtures/ORM/` `/tests/Features/fixtures/ORM/\*`   @Bundle `@AppBundle` `src/AppBundle/DataFixtures/ORM/\*`  Paths can also be directories.

Credits
-------

[](#credits)

This library is developed by [Théo FIDRY](https://github.com/theofidry).

License
-------

[](#license)

[![license](https://camo.githubusercontent.com/10e85a5778fe7601504a17ecd18dfa7097f473186b0f947bc10db2d3e4f530e4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d7265642e7376673f7374796c653d666c61742d737175617265)](LICENSE)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% 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 ~36 days

Recently: every ~61 days

Total

9

Last Release

3626d ago

Major Versions

v0.1 → v1.0.0-beta2015-09-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/6fbf458a1f05f8ac5a3c8f6c5426abe81084b7077b24955747b09c35f6c983be?d=identicon)[theofidry](/maintainers/theofidry)

---

Top Contributors

[![theofidry](https://avatars.githubusercontent.com/u/5175937?v=4)](https://github.com/theofidry "theofidry (48 commits)")[![caciobanu](https://avatars.githubusercontent.com/u/3765656?v=4)](https://github.com/caciobanu "caciobanu (2 commits)")[![GeLoLabs](https://avatars.githubusercontent.com/u/149005863?v=4)](https://github.com/GeLoLabs "GeLoLabs (2 commits)")[![akomm](https://avatars.githubusercontent.com/u/2409779?v=4)](https://github.com/akomm "akomm (1 commits)")[![Simperfit](https://avatars.githubusercontent.com/u/3451634?v=4)](https://github.com/Simperfit "Simperfit (1 commits)")

---

Tags

alicebehat-extensionfixturessymfonyFixturefakerormContextBehataliceextension

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/theofidry-alice-fixtures-extension/health.svg)

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

###  Alternatives

[hautelook/alice-bundle

Symfony bundle to manage fixtures with Alice and Faker.

19519.4M34](/packages/hautelook-alice-bundle)[theofidry/alice-data-fixtures

Nelmio alice extension to persist the loaded fixtures.

32528.5M70](/packages/theofidry-alice-data-fixtures)[omines/datatables-bundle

Symfony DataTables Bundle with native Doctrine ORM, Elastica and MongoDB support

2851.4M6](/packages/omines-datatables-bundle)

PHPackages © 2026

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