2017 © Pedro Peláez
 

library alice-generator

Automatically generates alice fixture based on a set of objects

image

trappar/alice-generator

Automatically generates alice fixture based on a set of objects

  • Tuesday, April 10, 2018
  • by trappar
  • Repository
  • 1 Watchers
  • 29 Stars
  • 16,189 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 5 Forks
  • 5 Open issues
  • 8 Versions
  • 18 % Grown

The README.md

AliceGenerator Build Status

Recursively convert existing objects into Alice Fixtures., (*1)

Introduction

Sometimes you find yourself working on a large project with no existing fixtures. In this case even though Alice makes fixtures much easier to write, that process can still be tedious., (*2)

This library proposes an alternate starting point - automatically generate fixtures from your existing data., (*3)

This opens up a whole new, much faster way to get your test data established... just enter it in your user interface!, (*4)

Example

Let's say you have the following objects, (*5)

<?php
class Post {
    public $title;
    public $body;
    public $postedBy;
}

class User {
    public $username;
}

$user = new User();
$user->username = 'Trappar';

$post1 = new Post();
$post1->title = 'Is Making Fixtures Too Time Consuming?';
$post1->body = 'Check out Alice!';
$post1->postedBy = $user;

$post2 = new Post();
$post2->title = 'Too Much Data to Hand Write?';
$post2->body = 'Check out AliceGenerator!';
$post2->postedBy = $user;

This library let's you turn that directly into..., (*6)

Post:
    Post-1:
        title: 'Is Making Fixtures Too Time Consuming?'
        body: 'Check out Alice!'
        postedBy: '@User-1'
    Post-2:
        title: 'Too Much Data to Hand Write?'
        body: 'Check out AliceGenerator!'
        postedBy: '@User-1'
User:
    User-1:
        username: Jeff

Installation

You can use Composer to install the library to your project:, (*7)

composer require trappar/alice-generator

Features

  • Framework support
    • Supports Symfony via AliceGeneratorBundle - Start generating fixtures immediately with zero custom code required!
  • ORM support
    • Supports Doctrine natively
    • Can operate without any ORM
    • Can be extended to support any ORM
  • Many ways to make use of Faker providers
  • Configure how your objects are serialized using annotations or YAML metadata
  • Can serialize any object type using custom ObjectHandlers
  • Supports multiple levels of recursion taming
    • Handles circular references automatically
    • Customizable maximum recursion depth
    • Can restrict object traversal to only specific objects of a type
  • Supports several methods of naming Alice references natively - fully customizable

Table of Contents

Resources

Credits

This bundle was developed by Jeff Way with quite a lot of inspiration from: * nelmio/alice * schmittjoh/serializer, (*8)

Other contributors., (*9)

License

license, (*10)

The Versions

10/04 2018

dev-master

9999999-dev

Automatically generates alice fixture based on a set of objects

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeff Way

orm test generator doctrine data alice fixture

10/04 2018

0.3.0.x-dev

0.3.0.9999999-dev

Automatically generates alice fixture based on a set of objects

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeff Way

orm test generator doctrine data alice fixture

10/04 2018

v0.3.0

0.3.0.0

Automatically generates alice fixture based on a set of objects

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeff Way

orm test generator doctrine data alice fixture

26/05 2017

dev-issue_10

dev-issue_10

Automatically generates alice fixture based on a set of objects

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeff Way

orm test generator doctrine data alice fixture

09/11 2016

v0.2.1

0.2.1.0

Automatically generates alice fixture based on a set of objects

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeff Way

orm test generator doctrine data alice fixture

09/11 2016

v0.2.0

0.2.0.0

Automatically generates alice fixture based on a set of objects

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeff Way

orm test generator doctrine data alice fixture

14/10 2016

v0.1.1

0.1.1.0

Automatically generates alice fixture based on a set of objects

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeff Way

orm test generator doctrine data alice fixture

25/08 2016

v0.1.0

0.1.0.0

Automatically generates alice fixture based on a set of objects

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeff Way

orm test generator doctrine data alice fixture