Search by

solitus0 / alice-generator

solitus0

Export existing PHP objects and Doctrine entities as reusable Alice fixtures

Package info

github.com/solitus0/AliceGenerator

pkg:composer/solitus0/alice-generator

Statistics

Installs: 853

Dependents: 0

Suggesters: 0

Stars: 0

v0.2.0 2026-11-11 06:38 UTC

This package is auto-updated.

Last update: 2026-11-11 06:41:11 UTC


README

Packagist Version License

AliceGenerator is a PHP 8.1+ library that exports existing objects, including Doctrine entities, as reusable Alice fixtures. It preserves shared objects and cycles as named references in the generated YAML.

Generating fixtures from records created through your application's workflows saves time and gives you realistic test data that reflects your business rules and preserves relationships between records.

A database feeds the orange Task-1 tile into fixtures.yaml. Both tasks reference Assignee-1. The Nelmio robot stands beside the file.

Quick start

composer require solitus0/alice-generator --dev

Run the PHP quick start to export two tasks that share one assignee. The YAML groups fixtures by fully qualified class name, and both tasks reference the same assignee fixture.

App\Entity\Assignee:
    Assignee-1:
        name: Alex
App\Entity\Task:
    Task-1:
        title: 'Send invoice'
        assignee: '@Assignee-1'
    Task-2:
        title: Review
        assignee: '@Assignee-1'

Documentation

AliceGenerator is an independently maintained fork of trappar/AliceGenerator. It is released under the MIT License.