Giter Site home page Giter Site logo

ddd-test's Introduction

Description

We have small application to subscribe users where we'd like to implement Command Query Separation to eventually migrate to the CQRS pattern.

To subscribe a user we call

bin/console user:subscribe [email protected]

We would like you to finish this console action to subscribe a user and print some info about it using CQS best practices. We would also like to record some domain events (well, in this case there's only one possible event) even though there are no listeners at this point. And of course, a little bit of testing (functional, unit) using behat/phpspec or PHPUnit won't hurt either ;)

In the given composer.json you have already included an implementation of the Command Bus pattern using Simple Bus - Message Bus that you may find convenient. Feel free to use any other Command Bus implementation you like.

How to use

Run the development environment:

docker-compose build
docker-compose run --rm --user=$UID:$GID php sh  

Inside the container, you can:

  • Install the app
composer install
  • Check code style, and execute functional and unit tests
phpcs
behat
phpunit --testdox

Run the console commands:

console user:subscribe <email> #Subscribe a user
console user:subscribed        #Subscription list

ddd-test's People

Stargazers

Rait Kapp avatar

Watchers

James Cloos avatar Juan Gabriel Rodríguez Carrión 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.