trappar / alice-generator-bundle
Symfony bundle for generating Alice fixtures from Doctrine entities
Installs: 169 162
Dependents: 1
Suggesters: 0
Security: 0
Stars: 45
Watchers: 2
Forks: 12
Open Issues: 6
Type:symfony-bundle
Requires
- php: ^7.1
- doctrine/doctrine-bundle: ^1.6
- doctrine/orm: ~2.4
- symfony/console: ^3.0|^4.0
- symfony/finder: ^3.0|^4.0
- symfony/framework-bundle: ^3.0|^4.0
- symfony/validator: ^3.0|^4.0
- symfony/yaml: ^3.0|^4.0
- trappar/alice-generator: ^0.3
Requires (Dev)
- matthiasnoback/symfony-dependency-injection-test: ^3.0
- phpunit/phpunit: ^7.1
- symfony/phpunit-bridge: ^3.0|^4.0
README
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: