msgphp/eav-bundle

Basic entity-attribute-value management (the `EAV` domain)

v0.5.0 2018-07-08 09:43 UTC

README

A Symfony bundle for basic EAV management.

Latest Stable Version

This package is part of the Message driven PHP project.

MsgPHP is a project that aims to provide (common) message based domain layers for your application. It has a low development time overhead and avoids being overly opinionated.

Installation

composer require msgphp/eav-bundle

Features

  • Symfony 3.4 / 4.0 ready
  • Symfony messenger commands & events
  • Doctrine persistence
  • Default attribute value types: bool, int, float, string, \DateTimeInterface and null

Configuration

<?php
// config/packages/msgphp_eav.php

use MsgPhp\Eav\Entity\{Attribute, AttributeValue};
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

return function (ContainerConfigurator $container) {
    $container->extension('msgphp_eav', [
        'class_mapping' => [
            Attribute::class => \App\Entity\Eav\Attribute::class,
            AttributeValue::class => \App\Entity\Eav\AttributeValue::class,
        ],
    ]);
};

And be done.

Documentation

Contributing

This repository is READ ONLY. Issues and pull requests should be submitted in the main development repository.