Download the PHP package event-engine/php-engine-skeleton without Composer

On this page you can find all versions of the php package event-engine/php-engine-skeleton. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-engine-skeleton

php-engine-skeleton

Dockerized PHP skeleton for Event Engine

Installation

Please make sure you have installed Docker and Docker Compose.

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

Replace MyService in all files to your appropriate service namespace.

@TODO: add functional and oop flavour branches

Tutorial

https://event-engine.io/tutorial/

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):

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

Cockpit is an admin UI for Event Engine. You can access it on port 4444: https://localhost:4444. The skeleton is preconfigured with the cockpit-php-backend handler.

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

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

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:

Troubleshooting

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

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?

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

Projection reset

The Event Engine Skeleton uses a single projection process (read more about prooph projections in the prooph docs). 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:

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

You can also check the projection log with:

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

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

prooph software

Event Engine is maintained by the prooph software team. 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.

If you are interested in this offer or need project support please get in touch.


All versions of php-engine-skeleton with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4
ext-pdo Version *
ext-mbstring Version *
ext-json Version *
roave/security-advisories Version dev-master
event-engine/php-engine Version ^0.15
event-engine/discolight Version ^0.2
event-engine/php-data Version ^1.0
event-engine/php-schema Version ^0.1
event-engine/php-messaging Version ^0.1
event-engine/php-engine-utils Version ^0.1
event-engine/php-logger Version ^0.1
event-engine/php-persistence Version ^0.8
event-engine/php-json-schema Version ^1.0
event-engine/php-postgres-document-store Version ^0.11
event-engine/prooph-v7-event-store Version ^0.9
event-engine/cockpit-php-backend Version dev-master
prooph/pdo-event-store Version ^1.0
prooph/humus-amqp-producer Version ^2.1
laminas/laminas-stdlib Version ^3.2
laminas/laminas-config-aggregator Version ^0.2.0
laminas/laminas-stratigility Version ^3.2
mezzio/mezzio-helpers Version ^5.3
nikic/fast-route Version ^1.3
psr/log Version ^1.1
monolog/monolog Version ^1.24
psr/http-server-middleware Version ^1.0
mezzio/mezzio-problem-details Version ^1.0
opis/json-schema Version ^1.0
laminas/laminas-diactoros Version ^2.2
laminas/laminas-httphandlerrunner Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package event-engine/php-engine-skeleton contains the following files

Loading the files please wait ....