Developed with love by KnpLabs Hire us for your project!
0

AliceGeneratorBundle

by trappar

A Symfony bundle to convert existing Doctrine entities into Alice fixtures

AliceGeneratorBundle Build Status

This bundle integrates the AliceGenerator library into Symfony.

Introduction

TrapparAliceGeneratorBundle allows you to generate Alice Fixtures from your existing data.

You can learn more in the documentation for the standalone library.

Table of Contents

Installation

composer require trappar/alice-generator-bundle

Then, enable the bundle by updating your app/AppKernel.php file to enable the bundle:

<?php
// in AppKernel::registerBundles()

if (in_array($this->getEnvironment(), ['dev', 'test'])) {
    // ...
    $bundles[] = new Trappar\AliceGeneratorBundle\TrapparAliceGeneratorBundle();
    // ...
}

Configuration

TrapparAliceGeneratorBundle requires no initial configuration to get you started.

For all available configuration options, please see the configuration reference.

Usage

The main method for using this bundle is the included command line application. Use this by running:

console generate:fixtures

And simply follow along with the prompts.

You can also request the FixtureGenerator as a service from the container:

$fixtureGenerator = $container->get('trappar_alice_generator.fixture_generator');
$yaml = $fixtureGenerator->generateYaml($entities);

Learn more in the documentation for the dedicated library.

Resources

Credits

This bundle was developed by Jeff Way with quite a lot of inspiration from:

Other contributors.

License

license

MIT License

Copyright (c) 2017 Jeff Way

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.