Skip to content
A command to load them all
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
spec/Knp/Rad/FixturesLoad Apply CS fixer, remove xml deps definition Feb 16, 2016
src/Knp/Rad/FixturesLoad Update FixturesCommand.php Aug 8, 2016
.gitignore Initial commit Mar 18, 2015
.php_cs Fix CS and dev version Mar 15, 2016
.travis.yml Update php requirements Sep 20, 2017 Change maintainers name Oct 16, 2018
composer.json Update php requirements Sep 20, 2017

Rapid Application Development : Fixtures Load

A command to load them all

Build Status Scrutinizer Code Quality Latest Stable Version Total Downloads Latest Unstable Version License

This library uses the awesome nelmio/alice library.

Official maintainers:


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


        return $bundles;


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

Load fixtures of all bundles

Just run the command

app/console rad:fixtures:load

Or if you need both resetting your schema, just add -r option

app/console rad:fixtures:load -r

Load fixtures of specific bundles

I've got two bundles, App and Api.

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

The order is important. Fixtures will be loaded following this order.

Use file filtering

If I run this command

app/console rad:fixtures:load -f dev

All files finishing with .dev.yml will be loaded. And just those files.

You can also chain filters.

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

In this case, order doesn't have any importance.

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.

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

    class: My\Processor # implements Nelmio\Alice\ProcessorInterface
        - { name: knp_rad_fixtures_load.processor }
You can’t perform that action at this time.