PHPackages                             family-office/fixtures-library - 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. family-office/fixtures-library

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

family-office/fixtures-library
==============================

An easy-to-use library for fixture and dependency loading.

1.0.1(4y ago)0961MITPHPPHP ^8.0

Since Sep 15Pushed 4y agoCompare

[ Source](https://github.com/FamilyOfficeOrg/fixtures-library)[ Packagist](https://packagist.org/packages/family-office/fixtures-library)[ Docs](https://github.com/FamilyOfficeOrg/fixtures-library)[ RSS](/packages/family-office-fixtures-library/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (10)Dependencies (18)Versions (20)Used By (0)

 [![](.github/project-logo.svg)](.github/project-logo.svg)
==========================================================

[](#----)

Fixtures Library
================

[](#fixtures-library)

An easy-to-use library for fixture and dependency loading.

> ⚠️ Disclaimer: This solution was developed for a very specific use-case. The best way to load fixtures in your use-case is most likely covered by [Doctrines data fixtures](https://github.com/doctrine/data-fixtures).

❤️ Feel like contributing?
--------------------------

[](#️-feel-like-contributing)

Read our [contribution guidelines](CONTRIBUTING.md) and create an [issue](https://github.com/FamilyOfficeOrg/fixtures-library/issues/new/choose) or a [pull request](https://github.com/FamilyOfficeOrg/fixtures-library/compare).

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

[](#installation)

```
composer require family-office/fixtures-library
```

💡 Usage
-------

[](#-usage)

### Creating a fixture

[](#creating-a-fixture)

Fixtures are regular classes implementing the [`FixtureInterface`](src/FixtureInterface.php).

```
namespace FamilyOffice\FixturesLibrary\Example\Basic\Fixtures;

use FamilyOffice\FixturesLibrary\FixtureInterface;

final class EarFixture implements FixtureInterface
{
    public function getDependencies(): array
    {
        return [];
    }

    public function load(): void
    {
        // todo: implement data loading
    }
}
```

All code that should be executed within the fixture should live in the `load` method.

Sometimes, fixtures need to depend on each other because they must be executed in a certain order.

All dependencies a fixture is dependent on should be returned from the `getDependencies` method.

```
namespace FamilyOffice\FixturesLibrary\Example\Basic\Fixtures;

use FamilyOffice\FixturesLibrary\FixtureInterface;

final class ElephantFixture implements FixtureInterface
{
    public function getDependencies(): array
    {
        return [EarFixture::class];
    }

    public function load(): void
    {
        // todo: implement data loading
    }
}
```

### Loading the Fixtures

[](#loading-the-fixtures)

The quickest and easiest way to load the fixtures is by creating a default chain builder instance.

```
$defaultChainBuilder = ChainBuilder::createQuickLoader();
```

The fixtures can then be easily loaded on-the-fly as the dependency tree is built.

```
$defaultChainBuilder->build([new ElephantFixture()]);
```

### Full Example

[](#full-example)

A full example of this can be found [here](./example/Basic).

### Advanced Usage

[](#advanced-usage)

The dependency chain building and loading process can be fully customized to your needs.

An extended documentation on the advanced capabilities of this library can be found [here](ADVANCED.md).

📝 License
---------

[](#-license)

This project is licensed under the [MIT](LICENSE) license. Feel free to do whatever you want with the code!

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 67.8% 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 ~9 days

Recently: every ~25 days

Total

13

Last Release

1646d ago

Major Versions

0.4.4 → 1.0.02021-11-28

PHP version history (4 changes)0.1.0PHP &gt;=7.4

0.3.0PHP ^7.4

0.4.1PHP ^7.4 || ^8.0

1.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/baf9a54574049c3f82aefd2a37c8e851d27124b170b2c445aab34b44692b3fb7?d=identicon)[b\_pesch](/maintainers/b_pesch)

---

Top Contributors

[![fpesch](https://avatars.githubusercontent.com/u/57272786?v=4)](https://github.com/fpesch "fpesch (122 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (58 commits)")

---

Tags

dependency-parsingfixture-loadingfixturesphpfixture-loadingdependency-parsing

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm, Rector

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/family-office-fixtures-library/health.svg)

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

###  Alternatives

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

23.9k69.5k](/packages/grumpydictator-firefly-iii)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k28.9M2.4k](/packages/infection-infection)[firefly-iii/data-importer

Firefly III Data Import Tool.

8035.8k](/packages/firefly-iii-data-importer)[laragraph/utils

Utilities for using GraphQL with Laravel

2215.5M10](/packages/laragraph-utils)[keepsuit/laravel-opentelemetry

OpenTelemetry integration for laravel

167558.4k1](/packages/keepsuit-laravel-opentelemetry)[byte5/laravel-passgenerator

A Laravel package to create Apple Wallet (old Passbook) compatible tickets.

9239.0k](/packages/byte5-laravel-passgenerator)

PHPackages © 2026

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