PHPackages                             tarnawski/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tarnawski/fixtures

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tarnawski/fixtures
==================

Tool to help manage fixtures in a PHP project

31PHP

Since Apr 18Pushed 8y agoCompare

[ Source](https://github.com/tarnawski/fixture)[ Packagist](https://packagist.org/packages/tarnawski/fixtures)[ RSS](/packages/tarnawski-fixtures/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Fixtures loader
===============

[](#fixtures-loader)

Tool to help manage fixtures in a PHP project

[![Build Status](https://camo.githubusercontent.com/c1c6179bcfabd9f80c0198d5072a4448cf4918d630dee7831fecb26d491883f5/68747470733a2f2f7472617669732d63692e6f72672f7461726e6177736b692f666978747572652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tarnawski/fixture)

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

[](#installation)

```
$ composer require tarnawski/fixtures
```

Supported type of fixtures file
-------------------------------

[](#supported-type-of-fixtures-file)

### YAML

[](#yaml)

```
document:
  - id: 1
    name: Secret document
    status: draft
  - id: 2
    name: Other document
    status: published
```

### JSON

[](#json)

```
{
  "document": [
      {
        "id": "1",
        "name": "Secret document",
        "status": "draft"
      },
      {
        "id": "2",
        "name": "Other document",
        "status": "published"
      }
    ]
}
```

### XML

[](#xml)

```

        1
        Secret document
        draft

        2
        Other document
        published

```

Usage standalone
----------------

[](#usage-standalone)

```
$loader = new FileLoader();
$parser = new JSONParser();
$driver = new PDODriver('database', 'host', 'port', 'user', 'passoword');
$fixtureBuilder = new FixtureBuilder($loader, $parser, $driver);
$fixtureBuilder->load('fixtures/document.json');
```

Usage with Symfony
------------------

[](#usage-with-symfony)

1. Enable the Bundle:

```
$bundles = array(
    new Fixture\Bridge\Symfony\FixtureBundle(),
);
```

2. Configure the Bundle:

```
fixture:
    path: '%kernel.project_dir%/fixtures/document.json'
    loader: 'file'
    parser: 'json'
    driver: 'pdo'
```

3. Run command:

```
php bin/console fixture:load
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/55879acfb26db4b5d617aedd6adadc79a706846cea6ffd93eec64a5ab8e0f6d0?d=identicon)[tarnawski](/maintainers/tarnawski)

---

Top Contributors

[![tarnawski](https://avatars.githubusercontent.com/u/11235024?v=4)](https://github.com/tarnawski "tarnawski (6 commits)")

### Embed Badge

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

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

###  Alternatives

[emil/inliner

1911.3k1](/packages/emil-inliner)[flowpack/nodegenerator

Random nodes generator for Neos CMS

122.1k](/packages/flowpack-nodegenerator)[haariga/craft-gonzo

Component Library from your templates Folder

121.7k](/packages/haariga-craft-gonzo)[bigelephant/string

A string helper task with built in classes to easily add to Laravel 4

121.7k](/packages/bigelephant-string)

PHPackages © 2026

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