PHPackages                             event-engine/php-engine-skeleton - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. event-engine/php-engine-skeleton

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

event-engine/php-engine-skeleton
================================

Dockerized PHP skeleton for Event Engine

v0.6.4(5y ago)131806[2 issues](https://github.com/event-engine/php-engine-skeleton/issues)[2 PRs](https://github.com/event-engine/php-engine-skeleton/pulls)MITPHPPHP ^7.4

Since Mar 21Pushed 3y ago3 watchersCompare

[ Source](https://github.com/event-engine/php-engine-skeleton)[ Packagist](https://packagist.org/packages/event-engine/php-engine-skeleton)[ Docs](https://event-engine.io/)[ RSS](/packages/event-engine-php-engine-skeleton/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (10)Dependencies (28)Versions (14)Used By (0)

php-engine-skeleton
===================

[](#php-engine-skeleton)

Dockerized PHP skeleton for [Event Engine](https://event-engine.io)

Installation
------------

[](#installation)

Please make sure you have installed [Docker](https://docs.docker.com/engine/installation/ "Install Docker") and [Docker Compose](https://docs.docker.com/compose/install/ "Install Docker Compose").

```
$ docker run --rm -it -v $(pwd):/app prooph/composer:7.4 create-project event-engine/php-engine-skeleton
$ cd
$ sudo chown $(id -u -n):$(id -g -n) . -R
$ docker-compose up -d
$ docker-compose run php php scripts/create_event_stream.php
```

Head over to `https://localhost` to check if the containers are up and running. Accept the self-signed certificate and you should see a "It works" message.

Customization
-------------

[](#customization)

Replace `MyService` in all files to your appropriate service namespace.

@TODO: add functional and oop flavour branches

Tutorial
--------

[](#tutorial)

### Database

[](#database)

The skeleton uses a single Postgres database for both write and read model.

You can connect to the Postgres DB using following credentials (listed also in `app.env`):

```
PDO_DSN=pgsql:host=postgres port=5432 dbname=event_engine
PDO_USER=postgres
PDO_PWD=dev
```

*Note: The DB runs insight a docker container. Use `localhost` as host name if you want to connect from your host system!*

### Event Engine Cockpit

[](#event-engine-cockpit)

[Cockpit](https://github.com/event-engine/cockpit) is an admin UI for Event Engine. You can access it on port `4444`: . The skeleton is preconfigured with the [cockpit-php-backend handler](https://github.com/event-engine/cockpit-php-backend).

*Note: To avoid CORS issues the Nginx configuration of the Cockpit server is modified to also act as a reverse proxy for requests from Cockpit to the backend.*

You can execute the built-in `HealthCheck` query to very that Cockpit can access the Event Engine backend.

[![HealthCheck](https://github.com/event-engine/php-engine-skeleton/raw/master/docs/assets/cockpit_health_check.png?raw=true)](https://github.com/event-engine/php-engine-skeleton/blob/master/docs/assets/cockpit_health_check.png?raw=true)

### RabbitMQ

[](#rabbitmq)

The skeleton uses RabbitMQ as a message broker with a preconfigured exchange called `ui-exchange` and a corresponding queue called `ui-queue`. You can open the Rabbit Mgmt UI in the browser: `http://localhost:8081` and login with `user: prooph`and `password: prooph`.

The skeleton also contains a demo JS client which connects to a websocket and consumes messages from the `ui-queue`. Open `http://localhost:8080/ws.html` in your browser and forward events on the queue with `$eventEngine->on(Event::MY_EVENT, UiExchange::class)`. Check `src/Domain/Api/Listener` for an example.

Unit and Integration Tests
--------------------------

[](#unit-and-integration-tests)

We've prepared a `BaseTestCase` located in `tests`. Extend your test cases from that class to get access to some very useful test helpers. Check the tutorial for a detailed explanation.

You can run the tests using docker:

```
docker-compose run php php vendor/bin/phpunit
```

Troubleshooting
---------------

[](#troubleshooting)

With the command `docker-compose ps` you can list the running containers. This should look like the following list:

```
                    Name                                   Command               State                             Ports
---------------------------------------------------------------------------------------------------------------------------------------------------
eebuildings_event_engine_projection_1    docker-php-entrypoint php  ...   Up
eebuildings_nginx_1                      nginx -g daemon off;             Up      0.0.0.0:443->443/tcp, 0.0.0.0:8080->80/tcp
eebuildings_php_1                        docker-php-entrypoint php-fpm    Up      9000/tcp
eebuildings_postgres_1                   docker-entrypoint.sh postgres    Up      0.0.0.0:5432->5432/tcp
eebuildings_rabbit_1                     docker-entrypoint.sh rabbi ...   Up      0.0.0.0:8081->15671/tcp, 15672/tcp,
                                                                                         0.0.0.0:15691->15691/tcp, 25672/tcp, 4369/tcp, 5671/tcp,
                                                                                         5672/tcp
```

Make sure that all required ports are available on your machine. If not you can modify port mapping in the `docker-compose.yml`.

### Have you tried turning it off and on again?

[](#have-you-tried-turning-it-off-and-on-again)

If something does not work as expected try to restart the containers first:

```
$ docker-compose down
$ docker-compose up -d
```

### Projection reset

[](#projection-reset)

The Event Engine Skeleton uses a single projection process (read more about prooph projections in the [prooph docs](http://docs.getprooph.org/event-store/projections.html#3-4)). You can register your own projections in event engine which are all handled by the one background process that is started automatically with the script `bin/event_engine_projection.php`. Also see `docker-compose.yml`. The projection container is not activated by default. Uncomment it in the `docker-compose.yml` to make use of it.

Docker is configured to restart the projection container in case of a failure. In dev mode, the projection process dies from time to time to catch up with your latest code changes.

If you recognize that your read models are not up-to-date or you need to reset the read model you can use this command:

```
$ docker-compose run php php bin/reset.php
```

If you still have trouble try a step by step approach:

```
$ docker-compose stop event_engine_projection
$ docker-compose run php php bin/reset.php
$ docker-compose up -d
```

You can also check the projection log with:

```
$ docker-compose logs -f event_engine_projection
```

### Event Engine Cockpit is not updated

[](#event-engine-cockpit-is-not-updated)

When you add new commands or queries in Event Engine the Cockpit UI will not automatically reread the schema from the backend. Use the refresh button in the top menu to reload the schema.

Batteries Included
------------------

[](#batteries-included)

You know the headline from Docker, right? The Event Engine skeleton follows the same principle. It ships with a default set up so that you can start without messing around with configuration and such. The default set up is likely not what you want to use in production. The skeleton can be and **should be** adapted.

Focus of the skeleton is to provide *an easy to use development environment*, hence it uses default settings of Postgres and RabbitMQ containers. **Make sure to secure the containers before you deploy them anywhere!** You should build and use your own docker containers in production anyway. And if you cannot or don't want to use Docker then provide the needed infrastructure the way you prefer and just point Event Engine to it by adjusting configuration.

Powered by prooph software
--------------------------

[](#powered-by-prooph-software)

[![prooph software](https://github.com/codeliner/php-ddd-cargo-sample/raw/master/docs/assets/prooph-software-logo.png)](http://prooph.de)

Event Engine is maintained by the [prooph software team](http://prooph-software.de/). The source code of Event Engine is open sourced along with an API documentation and a getting started demo. Prooph software offers commercial support and workshops for Event Engine as well as for the [prooph components](http://prooph.de).

If you are interested in this offer or need project support please [get in touch](http://getprooph.org/#get-in-touch).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~63 days

Recently: every ~57 days

Total

11

Last Release

1980d ago

PHP version history (2 changes)v0.1.0PHP ^7.2

v0.5.0PHP ^7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/e14a3b6de25e60cb289c51b23c58ffd8c56b28053deb4a75d3b7ea6b7fa03809?d=identicon)[proophsoftware](/maintainers/proophsoftware)

---

Top Contributors

[![jsor](https://avatars.githubusercontent.com/u/55574?v=4)](https://github.com/jsor "jsor (1 commits)")[![shochdoerfer](https://avatars.githubusercontent.com/u/596449?v=4)](https://github.com/shochdoerfer "shochdoerfer (1 commits)")[![uniconstructor](https://avatars.githubusercontent.com/u/1384545?v=4)](https://github.com/uniconstructor "uniconstructor (1 commits)")[![zluiten](https://avatars.githubusercontent.com/u/1336070?v=4)](https://github.com/zluiten "zluiten (1 commits)")

---

Tags

event-enginephp7proophskeleton-application

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/event-engine-php-engine-skeleton/health.svg)

```
[![Health](https://phpackages.com/badges/event-engine-php-engine-skeleton/health.svg)](https://phpackages.com/packages/event-engine-php-engine-skeleton)
```

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[rareloop/lumberjack-core

A powerful MVC framework for the modern WordPress developer. Write better, more expressive and easier to maintain code

42155.0k19](/packages/rareloop-lumberjack-core)[event-engine/php-engine

CQRS / ES PHP SDK for event-engine.io

5436.1k2](/packages/event-engine-php-engine)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
