2017 © Pedro Peláez
 

library rad-fixtures-load

A command to load them all

image

knplabs/rad-fixtures-load

A command to load them all

  • Thursday, September 21, 2017
  • by Knplabs
  • Repository
  • 24 Watchers
  • 23 Stars
  • 62,172 Installations
  • PHP
  • 1 Dependents
  • 2 Suggesters
  • 8 Forks
  • 3 Open issues
  • 15 Versions
  • 2 % Grown

The README.md

DEPRECATED

Unfortunately we decided to not maintain this project anymore (see why). If you want to mark another package as a replacement for this one please send an email to hello@knplabs.com., (*1)

Rapid Application Development : Fixtures Load

A command to load them all, (*2)

Build Status Scrutinizer Code Quality Latest Stable Version Total Downloads Latest Unstable Version License, (*3)

This library uses the awesome nelmio/alice library., (*4)

Official maintainers:

Installation

composer require --dev knplabs/rad-fixtures-load:~1.0
class AppKernel
{
    function registerBundles()
    {
        $bundles = array(
            //...
            new Knp\Rad\FixturesLoad\Bundle\FixturesLoadBundle(),
            //...
        );

        //...

        return $bundles;
    }
}

Usages

Inside your bundle, you have to store your Alice fixtures files into Resources/fixtures/orm., (*5)

Load fixtures of all bundles

Just run the command, (*6)

app/console rad:fixtures:load

Or if you need both resetting your schema, just add -r option, (*7)

app/console rad:fixtures:load -r

Load fixtures of specific bundles

I've got two bundles, App and Api., (*8)

app/console rad:fixtures:load -b App -b Api

The order is important. Fixtures will be loaded following this order., (*9)

Use file filtering

If I run this command, (*10)

app/console rad:fixtures:load -f dev

All files finishing with .dev.yml will be loaded. And just those files., (*11)

You can also chain filters., (*12)

app/console rad:fixtures:load -f dev -f test

In this case, order doesn't have any importance., (*13)

Use Alice provider or Alice processor

You just have to tag your service with knp_rad_fixtures_load.provider or knp_rad_fixtures_load.processor., (*14)

my_bundle.my_provider:
    class: My\Provider
    tags:
        - { name: knp_rad_fixtures_load.provider }

my_bundle.my_processor:
    class: My\Processor # implements Nelmio\Alice\ProcessorInterface
    tags:
        - { name: knp_rad_fixtures_load.processor }

The Versions

16/11 2015
27/10 2015

dev-revert-16-bugfix-add-alice-doctrine-persister

dev-revert-16-bugfix-add-alice-doctrine-persister

A command to load them all

  Sources   Download

MIT

The Requires

 

The Development Requires

command symfony2 fixtures load alice

31/07 2015
31/07 2015
30/07 2015