simgroep/broadway-simple-serializer

Simple serializer for Broadway

0.1.0 2017-03-06 13:33 UTC

This package is auto-updated.

Last update: 2024-10-20 01:21:45 UTC


README

At SIMgroep we're really fond of DDD, CQRS and event sourcing. We build our applications using the Symfony framework and Broadway. One of the things in Broadway that requires a lot of repetitions is implementing the Broadway\Serializer\Serializable for your domain events. The serializer in this repository aims to solve this problem. Yes, this is a little bit of magic. And magic is evil. Use it wisely!

Build Status

Installation

Summon composer:

$ composer require simgroep/broadway-simple-serializer

Enable the bundle:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...

        new Simgroep\BroadwaySimpleSerializer\Bundle\SimgroepBroadwaySimpleSerializerBundle(),
    );
}

Configuration

Configure Broadway:

broadway:
    serializer:
        payload: simgroep_broadway.simple_serializer

Enjoy!