PHPackages                             adlarge/fixtures-documentation-bundle - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. adlarge/fixtures-documentation-bundle

ActiveSymfony-bundle[Testing &amp; Quality](/categories/testing)

adlarge/fixtures-documentation-bundle
=====================================

Fixtures documentation generator

1.3.1(5y ago)1018.7k1MITPHPPHP ^7.1CI failing

Since Aug 20Pushed 5y ago1 watchersCompare

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

READMEChangelogDependencies (12)Versions (12)Used By (0)

Fixtures Documentation Bundle
=============================

[](#fixtures-documentation-bundle)

[![Package version](https://camo.githubusercontent.com/d6366c95c764ed418bd2dadcc52ef50f25d5f491a4a1ea2208c4e0a87a0f2bed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61646c617267652f66697874757265732d646f63756d656e746174696f6e2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/adlarge/fixtures-documentation-bundle)[![Build Status](https://camo.githubusercontent.com/786b3fa4f1581c0ef84a9ec20e7547834baa9012ba70d47d125c1a2e3105ccf4/68747470733a2f2f7472617669732d63692e6f72672f61646c617267652f66697874757265732d646f63756d656e746174696f6e2d62756e646c652e7376673f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://travis-ci.org/adlarge/fixtures-documentation-bundle?branch=master)[![Coverage Status](https://camo.githubusercontent.com/22846a05e396dba80b414e841352e6f668d58ab9d8a08c26a22e305b2dd9730d/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f61646c617267652f66697874757265732d646f63756d656e746174696f6e2d62756e646c652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/adlarge/fixtures-documentation-bundle?branch=master)[![License](https://camo.githubusercontent.com/10e85a5778fe7601504a17ecd18dfa7097f473186b0f947bc10db2d3e4f530e4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d7265642e7376673f7374796c653d666c61742d737175617265)](LICENSE)

This Symfony bundle generates and exposes a documentation of your fixtures. An action to reload your fixtures can also be configured.

The goal of this bundle is to allow testers to be independent, they can see data and reload fixtures when they want to test again.

What does it do
---------------

[](#what-does-it-do)

It will generate a json file with all the data to be used in a twig page to display fixtures to the end user.

To add data to this json file you can process full manually, manually by passing the entity or full automatically. The main data to know of are : the type of the fixture (section title), the id of the fixture and the data of the fixture.

It will display a page with a menu corresponding to the different sections (with links), and data tables regrouped by section. If you used links, it will display some columns with visible links to go directly to the linked object.

When it encounter a property it can have 3 behaviors :

- If it's a simple (scalar) property, it will display it (string, bool, int, etc)
- If it's an array, it will display the total of elements in this array
- If it's an object and it got a \_\_toString public method, it will display the result of this method. If this class is in your configuration of entities, it will add a link toward it.

Working projects examples
-------------------------

[](#working-projects-examples)

Some external projects are available to see and test the behavior of this bundle. You'll have to clone it next to this bundle and follow the documentation to make it work and see the prepared result by yourself.

- The project for [Manual case](https://github.com/bluepioupiou/fixture-doc-manualcase) : if you want to manually manage your documentation
- The project for [Doctrine automatic case](https://github.com/bluepioupiou/fixture-doc-autocase) : if you use doctrine and just want to configure entities and properties to document and let the bundle do
- The project for [Alice case](https://github.com/bluepioupiou/fixture-doc-alicecase) : if you load fixtures through Alice bundle and want to let the bundle do with your configuration

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

[](#installation)

This is installable via [Composer](https://getcomposer.org/) as [adlarge/fixtures-documentation-bundle](https://packagist.org/packages/adlarge/fixtures-documentation-bundle):

```
composer require --dev adlarge/fixtures-documentation-bundle

```

The default url to access the documentation is **/fixtures/doc**

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

[](#configuration)

Add the bundle to your `config/bundles.php` :

```
return [
    // ...
    Adlarge\FixturesDocumentationBundle\AdlargeFixturesDocumentationBundle::class => ['dev' => true],
    // ...
];

```

Add the routing file `config/routes/dev/adlarge_fixtures_documentation.yaml` and paste the following content :

```
AdlargeFixturesDocumentation:
    resource: '@AdlargeFixturesDocumentationBundle/Resources/config/routing.yml'

```

You can define vars by creating the file `config/packages/dev/adlarge_fixtures_documentation.yaml` :

```
adlarge_fixtures_documentation:
    title: 'Your title'
    reloadCommands:
        - php bin/console doctrine:fixtures:load
        - ....
    listenedCommand: 'doctrine:fixtures:load'
    enableAutoDocumentation: true
    fileDest: '%kernel.project_dir%/custom-folder'
    configEntities:
        Product:
            - id
            - name
            - category
        Customer:
            - firstname
            - lastname

```

- **title -** has a default value 'Fixtures documentation'
- **listenedCommand -** has a default value 'doctrine:fixtures:load'. For Alice bundle, you can set it to 'hautelook:fixtures:load'
- **reloadCommand -** is an optional array of commands you want to run from the view. If present a button to run these command will be visible in this view
- **enableAutoDocumentation -** is a boolean default to false. Set it to true if you want that all entities in fixtures are auto documented in postPersist
- **fileDest -** override default documentation file location in var folder
- **configEntities -** is an optional array of configurations for your entities you want to auto-document

Then you can install assets :

```
php bin/console assets:install --symlink

```

Examples
--------

[](#examples)

You can use 'enableAutoDocumentation' configuration. If set to 'True' this configuration will automatically document all objects according to 'configEntities' configuration when they are postPersist in database.

The postPersist is checked only where you configure the bundle (hopefully dev and test/acceptance) and when you launch the listenedCommand.

The examples are based on the following entities and properties

- 1 Customer, John Doe with
    - id
    - firstname
    - lastname
    - email
- 2 Products, linked to John Doe with
    - id
    - name
    - tags
    - owner

All of their properties have public getter to access them

### With doctrine

[](#with-doctrine)

With this example configuration

```
    adlarge_fixtures_documentation:
      title: Documentation auto
      enableAutoDocumentation: true
```

You just have to persist entities in the code when your listenedCommand is resolved

```
    $john = (new Customer())
        ->setFirstname('John')
        ->setLastname('Doe')
        ->setEmail('john.doe@test.fr');

    $manager->persist($john);

    $product = (new Product())
        ->setName("Product 1")
        ->setCategory("Category 1")
        ->setOwner($john)
        ->setTags(['tag1', 'tag2']);

    $manager->persist($product);

    $product = (new Product())
        ->setName("Product 2")
        ->setCategory("Category 2")
        ->setOwner($john)
        ->setTags(['tag2', 'tag2', 'tag3']);

    $manager->flush();
```

### With Alice bundle

[](#with-alice-bundle)

With this example configuration

```
    adlarge_fixtures_documentation:
      title: Documentation alice
      enableAutoDocumentation: true
      listenedCommand: hautelook:fixtures:load
      reloadCommands:
        - php bin/console hautelook:fixtures:load
```

You can then use the yaml configuration to load entities

```
    App\Entity\Customer:
      john:
        firstname: John
        lastname: Doe
        email: john.doe@test.com

    App\Entity\Product:
      product1:
        name: product 1
        owner: '@john'
      product2:
        name: product 2
        owner: '@john'
```

### Result

[](#result)

Both ways will follow this rule to auto document your entities :

It will take all public methods starting with 'get' and use them to document each entity.

[![Auto configuration](/doc/img/fixtures-documentation-empty.png)](/doc/img/fixtures-documentation-empty.png)

### More configurations

[](#more-configurations)

More configuration options are available [in this doc](doc/MORE_CONFIG.md)

Generate documentation
----------------------

[](#generate-documentation)

To generate the doc you only have to run `php bin/console doctrine:fixtures:load` or the command you've configured on your project.

Development
-----------

[](#development)

To make it run on your environment you have to install :

```
composer
php (7.1 or higher)
PHP extensions
* php-xml
* php-mbstring
* php-xdebug

```

To run tests on your env, run these commands. Each dev must cover 100% of code before PR

```
make test
make coverage

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

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

Total

10

Last Release

1950d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/872568d821d35f83a789110a16158bf1754d2d62270aad0c073170033c358853?d=identicon)[adlarge](/maintainers/adlarge)

---

Top Contributors

[![bluepioupiou](https://avatars.githubusercontent.com/u/3164314?v=4)](https://github.com/bluepioupiou "bluepioupiou (55 commits)")

---

Tags

fixturefixturesphp7symfonysymfony-bundletestFixturedata

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/adlarge-fixtures-documentation-bundle/health.svg)

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

###  Alternatives

[sylius/sylius

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

8.4k5.6M648](/packages/sylius-sylius)[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M309](/packages/easycorp-easyadmin-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[nelmio/alice

Expressive fixtures generator

2.5k43.4M133](/packages/nelmio-alice)

PHPackages © 2026

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