2017 © Pedro Peláez
 

symfony-bundle fixtures-bundle

A Symfony2 bundle to load yaml, json and toml fixtures. Easy extendable, resolve object dependency and validate objects.

image

davidbadura/fixtures-bundle

A Symfony2 bundle to load yaml, json and toml fixtures. Easy extendable, resolve object dependency and validate objects.

  • Saturday, February 8, 2014
  • by DavidBadura
  • Repository
  • 1 Watchers
  • 14 Stars
  • 42,499 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 4 Forks
  • 6 Open issues
  • 12 Versions
  • 5 % Grown

The README.md

DavidBaduraFixturesBundle

The project is no longer supported. If you still want to create fixtures with yaml, then I recommend switching to Alice., (*1)

Build Status Bitdeli Badge, (*2)

Features

  • DavidBaduraFakerBundle support (documentation)
  • Resolve object dependency (also bidirectional references)
  • Configurable default fixture converter (constructor, properties, set* and add* methods)
  • Easy to create your own converter
  • Extendable by events
  • Fixture filtering by tags
  • Object validation
  • Fixturemanager as a service
  • Fixture data validating and normalizing by symfony config component
  • MongoDB support
  • DefaultConverter: handle "setCreateDate(\DateTime $date)" methods
  • Security Encoder support

Todos

Documentation

1. Installation

Add DavidBaduraFixtureBundle in your composer.json, (*3)

``` js, (*4)

{ "require": { "davidbadura/fixtures-bundle": "1.0.*" } }, (*5)


Add the DavidBaduraFixturesBundle to your application kernel: ``` php // app/AppKernel.php public function registerBundles() { return array( // ... new DavidBadura\FixturesBundle\DavidBaduraFixturesBundle(), // ... ); }

2. Configuration

Configure DavidBaduraFixturesBundle:, (*6)

``` yaml, (*7)

app/config/config.yml

david_badura_fixtures: bundles: [YourBundle], (*8)


Activate support for MongoDB: ``` yaml # app/config/config.yml david_badura_fixtures: persister: odm

3. Create fixtures

Now you must create your fixture data:, (*9)

``` yaml, (*10)

@YourBundle/Resource/fixtures/install.yml

user: properties: class: "YourBundle\Entity\User" data: david: name: David email: "d.badura@gmx.de" groups: ["@group:admin"] # <- reference to group.admin, (*11)

group: properties: class: "YourBundle\Entity\Group" data: admin: name: Admin member: name: Member, (*12)

The fixture files will be automatically loaded from the `Resources\fixtures` folder.

4. Load fixtures
----------------

Command:

``` shell
php app/console davidbadura:fixtures:load

Service: php $fixtureManager = $container->get('davidbadura_fixtures.fixture_manager'); $fixtureManager->load();, (*13)

The Versions

08/02 2014

dev-master

9999999-dev

A Symfony2 bundle to load yaml, json and toml fixtures. Easy extendable, resolve object dependency and validate objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Badura

orm mongodb database json symfony2 toml doctrine fixtures yaml faker

14/12 2013

2.0.0-beta

2.0.0.0-beta

A Symfony2 bundle to load yaml, json and toml fixtures. Easy extendable, resolve object dependency and validate objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Badura

orm mongodb database json symfony2 toml doctrine fixtures yaml faker

06/12 2013

1.0.x-dev

1.0.9999999.9999999-dev

A Symfony2 bundle to load yaml fixtures. Easy extendable, resolve object dependency and validate objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Badura

orm database symfony2 doctrine fixtures yaml faker

06/12 2013

v1.0.8

1.0.8.0

A Symfony2 bundle to load yaml fixtures. Easy extendable, resolve object dependency and validate objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Badura

orm database symfony2 doctrine fixtures yaml faker

08/05 2013

v1.0.7

1.0.7.0

A Symfony2 bundle to load yaml fixtures. Easy extendable, resolve object dependency and validate objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Badura

orm database symfony2 doctrine fixtures yaml faker

25/03 2013

v1.0.6

1.0.6.0

A Symfony2 bundle to load yaml fixtures. Easy extendable, resolve object dependency and validate objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Badura

orm database symfony2 doctrine fixtures yaml faker

25/12 2012

v1.0.5

1.0.5.0

A Symfony2 bundle to load yaml fixtures. Easy extendable, resolve object dependency and validate objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

by David Badura

orm database symfony2 doctrine fixtures yaml faker

12/11 2012

v1.0.4

1.0.4.0

A Symfony2 bundle to load yaml fixtures

  Sources   Download

MIT

The Requires

 

by David Badura

orm database symfony2 doctrine fixtures yaml faker

12/11 2012

v1.0.3

1.0.3.0

A Symfony2 bundle to load yaml fixtures

  Sources   Download

MIT

The Requires

 

by David Badura

orm database symfony2 doctrine fixtures yaml

18/09 2012

v1.0.2

1.0.2.0

A Symfony2 bundle to load yaml fixtures

  Sources   Download

MIT

The Requires

 

by David Badura

orm database symfony2 doctrine fixtures yaml

21/07 2012

v1.0.1

1.0.1.0

A Symfony2 bundle to load yaml fixtures

  Sources   Download

MIT

The Requires

 

by David Badura

orm database symfony2 doctrine fixtures yaml

19/07 2012

v1.0.0

1.0.0.0

A Symfony2 bundle to load yaml fixtures

  Sources   Download

MIT

The Requires

 

by David Badura

orm database symfony2 doctrine fixtures yaml