Skip to content
Jakob Tapuć edited this page Jun 29, 2022 · 9 revisions

What is Empress?

Empress is a microframework based on amphp/http-server. It provides routing, after/before filters, data validation, status mappers, and custom exception handlers on top of http-server, together with a convenient API for handling requests and responses.

How do I run the examples?

Use the provided runner:

bin/empress examples/annotated_controller.php

Empress apps are always run in CLI mode. You don't need to set up any server stack to use it.

How do I create my own project?

Use Empress as a Composer dependency:

composer require empress-php/empress

See the examples directory and other wiki pages for more information.

Can I use blocking code in Empress?

You can. You can also shoot yourself in the foot 😬 Empress is fully async because it runs on top of amphp/http-server which in turn is powered by amphp/amp. So no place for lone fopen or file_get_contents or their other blocking friends. If you don't really know what all this async stuff is, head over to Amp's docs.

I'm stuck and I need help

Head over to Issues and open a new issue with the question tag. I'd like to create an inclusive and diversity-embracing beginner-friendly community around the project especially because async PHP is still a mystery to most people. I'll be happy to answer your questions.

Symfony/Laravel supports X but Empress doesn't

First of all, Empress is a microframework and it strives to be like that forever. If you think that there is a feature missing in Empress, create an issue with the enhancement tag and let's have it up for discussion 🔥 All useful contributions are welcome.