This repository was initially a simple Web application which implemented a single feature with a single scenario. Its goal was to provide a set of examples using some of the coolest tools for testing and design in PHP.
It was used for a testing class. The slides are available here.
I'm also starting to use it to describe how an hexagonal architecture might look like in PHP.
You will need Docker and Docker Compose to run this example. This is now, a monolithic repository using Composer's path feature.
You can customize most of the settings for the containers using the file .env.sh.template as a guide.
Run the following command to use the default settings (recommended):
$ make env
The only key that you need to modify in the new file containers/.env.sh
is
GITHUB_TOKEN
. You'll need a Github token as you will be running
composer install
for several applications.
Once you have everything configured, run this command:
$ make containers
I created some aliases to ease the use of the containers.
$ source .alias
You can run the Web application with this command:
$ web
Browse to http://localhost/ to see the web interface.
You can transfer funds to another member like in the web application with this command:
$ console ewallet:transfer
Both the Web and the console application generate domain events, those events trigger email notifications. Browse to http://localhost:8080/ to see the emails that are sent after transferring funds either from the console or the web application. To start the messaging container run this command:
$ messaging
You can start a bash
session and run the tests of all the applications and
packages with this command:
$ dev
Each folder in the applications
and packages
directories, has its own
README
file. See them for more details.