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

Abandoned → [nettrine/fixtures](/?search=nettrine%2Ffixtures)Library

zenify/doctrine-fixtures
========================

Doctrine Fixtures, Faker and Alice integration into Nette

v4.2(9y ago)920.3k↓100%4MITPHPPHP ^7.0

Since Sep 4Pushed 9y ago5 watchersCompare

[ Source](https://github.com/deprecated-packages/DoctrineFixtures)[ Packagist](https://packagist.org/packages/zenify/doctrine-fixtures)[ RSS](/packages/zenify-doctrine-fixtures/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (11)Versions (17)Used By (0)

Doctrine Fixtures
=================

[](#doctrine-fixtures)

[![Build Status](https://camo.githubusercontent.com/6691c1a3f8258fe33ac94a45038ff95729156d04a5995b10eacd26b4acd08b6d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f5a656e6966792f446f637472696e6546697874757265732e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/Zenify/DoctrineFixtures)[![Quality Score](https://camo.githubusercontent.com/878d08bb76da4de5e38fa34396520f6ec34e0e132f1bd9a5e4b2aa778265e133/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f5a656e6966792f446f637472696e6546697874757265732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/Zenify/DoctrineFixtures)[![Code Coverage](https://camo.githubusercontent.com/c05fc01e3f05a11524c24f65d000e913ea8154c94f42fb1c84b91f125ed6e027/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f5a656e6966792f446f637472696e6546697874757265732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/Zenify/DoctrineFixtures)[![Downloads](https://camo.githubusercontent.com/a7bf2d0a42cae05eff552faf3ecf260ac8f4bafbe77d057404bcbe01a5f42311/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a656e6966792f646f637472696e652d66697874757265732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zenify/doctrine-fixtures)[![Latest stable](https://camo.githubusercontent.com/b56dc7ca16bce1ec610895f327e879495f7731306a1a3c97ef27889f8bf533ef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a656e6966792f646f637472696e652d66697874757265732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zenify/doctrine-fixtures)

Integration of [nelmio/alice](https://github.com/nelmio/alice) to Nette DI. This package adds `.neon` support to Alice.

Alice uses [fzaninotto/Faker](https://github.com/fzaninotto/Faker) to generate fake data, so be sure to check that too.

Install
-------

[](#install)

```
composer require zenify/doctrine-fixtures
```

Register extensions:

```
# app/config/config.neon
extensions:
	- Kdyby\Annotations\DI\AnnotationsExtension
	- Kdyby\Events\DI\EventsExtension
	doctrine: Kdyby\Doctrine\DI\OrmExtension
	fixtures: Zenify\DoctrineFixtures\DI\FixturesExtension
```

Configuration
-------------

[](#configuration)

```
# default values
fixtures:
	locale: "cs_CZ" # e.g. change to en_US in case you want to use English
	seed: 1
```

For all supported locales, just check [Faker Providers](https://github.com/fzaninotto/Faker/tree/master/src/Faker/Provider).

Usage
-----

[](#usage)

We can load `.neon`/`.yaml` with specific fixtures structure. Alice turns them into entities and inserts them to database. To understand fixture files, just check the [README of nelmio/alice](https://github.com/nelmio/alice).

For example, this fixture will create 100 products with generated name:

`fixtures/products.neon`

```
Zenify\DoctrineFixtures\Tests\Entity\Product:
	"product{1..100}":
		__construct: [""]
```

### You can also include other fixtures

[](#you-can-also-include-other-fixtures)

`fixtures/products.neon`

```
include:
	- categories.neon

Zenify\DoctrineFixtures\Tests\Entity\Product:
	"product{1..100}":
		__construct: [""]
		category: "@category@brand"
```

`fixtures/categories.neon`

```
Zenify\DoctrineFixtures\Tests\Entity\Category:
	"category{1..10}":
		__construct: [""]
```

And then we can load them:

```
use Zenify\DoctrineFixtures\Contract\Alice\AliceLoaderInterface;

class SomeClass
{

	/**
	 * @var AliceLoaderInterface
	 */
	private $aliceLoader;

	public function __construct(AliceLoaderInterface $aliceLoader)
	{
		$this->aliceLoader = $aliceLoader;
	}

	public function loadFixtures()
	{
		// arg can be used file(s) or dir(s) with fixtures
		$entities = $this->aliceLoader->load(__DIR__ . '/fixtures');
		// ...
	}

}
```

That's it!

Testing
-------

[](#testing)

```
composer check-cs
vendor/bin/phpunit
```

Contributing
------------

[](#contributing)

Rules are simple:

- new feature needs tests
- all tests must pass
- 1 feature per PR

We would be happy to merge your feature then!

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~56 days

Recently: every ~141 days

Total

16

Last Release

3421d ago

Major Versions

v0.0.1 → v1.0.02014-09-04

v1.1.1 → v2.0.02014-11-24

v2.0.1 → v3.0.02014-12-11

v3.0.1 → v4.0.02015-06-12

PHP version history (4 changes)v2.0.0PHP &gt;=5.4

v3.0.0PHP &gt;=5.5

v4.0.0PHP &gt;=5.6

v4.1.0PHP ^7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/538058?v=4)[Milan Šulc](/maintainers/f3l1x)[@f3l1x](https://github.com/f3l1x)

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

---

Top Contributors

[![TomasVotruba](https://avatars.githubusercontent.com/u/924196?v=4)](https://github.com/TomasVotruba "TomasVotruba (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[bileto/cronner

Simple tool which helps with maintenance of cron tasks.

752.1k](/packages/bileto-cronner)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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