Code Monkey home page Code Monkey logo

prooph-fixtures-bundle's Introduction

Prooph Fixtures Bundle

Build Status Coverage Status

Symfony's Bundle for Prooph Fixtures.

Provides an easy integration of the library inside symfony by auto configuring the fixtures and providing a console command to load all your fixtures.

Installation

composer require --dev elythyr/prooph-fixtures-bundle

Versions management

Since its a practice project, I don't really care about BC breaks. I will only try to not break minor versions, meaning that:

  • Updating from 1.0.0 to 1.0.9 should not break anything
  • Updating from 1.0.0 to 1.1.0 might break a lot of stuff

Configuration

Projection cleaning strategy

By default the PdoCleaningProjectionStrategy will be used.

If you don't use prooph/pdo-event-store, then you will have to provide your own cleaning strategy and defined it as an alias to prooph_fixtures.cleaning_projection_strategy:

services:
    prooph_fixtures.cleaning_projection_strategy:
        alias: App\Infrastructure\Cleaner\CustomProjectionCleaningStrategy

Fixtures

There is nothing to configure!

Just make sure that your fixtures are defined as services and implements Prooph\Fixtures\Fixture\Fixture so they will be autoconfigured by the Bundle.

If you do not use autoconfiguration, then you must add the tag to all of your fixtures:

# config/services.yaml
services:
    # On a per class basis
    App\DataFixtures\MyAllNewFixtures:
        tags: ['prooph_fixtures.fixtures']

    # For an entire directory
    App\DataFixtures\:
        resource: '../src/DataFixtures'
        tags: ['prooph_fixtures.fixtures']

Usage

Simply go to your terminal and type:

php bin/console event-store:fixtures:load

Todo

  • Adds CI with Travis
  • Adds tests coverage
  • Make a first release
  • Publish to packagist
  • (Wondering) Adds events before/after: cleaning, loading all fixtures, loagin each fixture

prooph-fixtures-bundle's People

Contributors

camilledejoye avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.