Coder Social home page Coder Social logo

domain's Introduction

Somnambulist Domain Package

GitHub Actions Build Status Issues License PHP Version Current Version

Provides a core set of support classes for building domain oriented projects. This library compiles the previously separate domain and mapping libraries into a single project for easier maintenance.

It consists of:

  • Commands
    • CommandBus interface / abstract command
    • SF Messenger implementation
  • Doctrine
    • Enumeration factories + Type bindings
    • Additional types / type overrides for the Doctrine Type system
    • Abstract EntityLocator that extends EntityRepository
    • Custom Postgres DQL functions
    • Custom traits for EntityRepository
  • Models
    • Contracts - value object interface definitions
    • Types - a collection of value-objects, enumerations, and date helpers
    • AggregateRoot - an aggregate root stub implementation that can raise events
    • AbstractEntity and AbstractEntityCollection - child entities and helper for an aggregate root
  • Events
    • EventBus interface / abstract event
    • SF Messenger EventBus implementation
    • Doctrine subscriber that broadcasts onFlush all events from aggregate roots
    • Custom serializer to handle encode/decode when the event class does not exist
  • Jobs
    • JobQueue interface / abstract job
    • SF Messenger implementation
  • Queries
    • QueryBus interface / abstract query
    • SF Messenger implementation
  • default XML mappings for embeddable objects in Doctrine .dcm.xml and Symfony .orm.xml conventions

Requirements

  • PHP 8.0+
  • mb_string
  • bcmath
  • beberlei/assert
  • eloquent/enumeration
  • somnambulist/collection
  • symfony/messenger for the Messenger bus implementations.

Installation

Install using composer, or checkout / pull the files from github.com.

  • composer require somnambulist/domain

Upgrading from 4.X to 5.X

From 5.X this project will be re-namespaced to drop Domain. 4.X includes a classmap.php providing aliases for backwards compatibility.

Upgrading from 3.X to 4.X

From 4.X this project was re-namespaced to Somnambulist\Components\Domain. Update all references to reflect this change this includes any Doctrine mapping files / annotations.

The Doctrine AbstractIdentityType was moved out of the Identity namespace to the main Types.

Usage

See the docs folder for more documentation on each component.

Links

domain's People

Contributors

dave-redfern avatar jasonhofer 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.