Begin developing PSR-7 middleware applications in minutes!
Note: This project is a work in progress. Don't use it in production!
zend-expressive builds on zend-stratigility to provide a minimalist PSR-7 middleware framework for PHP, with the following features:
- Routing. Choose your own router; we support:
- DI Containers, via container-interop. Middleware matched via routing is retrieved from the composed container.
- Optionally, templating. We support:
Install this library using composer:
$ composer require zendframework/zend-expressive
You will also need a router. We currently support:
- Aura.Router:
composer require aura/router
- FastRoute:
composer require nikic/fast-route
- ZF2 MVC Router:
composer require zendframework/zend-mvc
We recommend using a dependency injection container, and typehint against container-interop. We can recommend the following implementations:
- zend-servicemanager:
composer require zendframework/zend-servicemanager
- pimple-interop:
composer require mouf/pimple-interop
Documentation is in the doc tree, and can be compiled using bookdown:
$ bookdown doc/bookdown.json
$ php -S 0.0.0.0:8080 -t doc/html/ # then browse to http://localhost:8080/
You can install bookdown globally using
composer global require bookdown/bookdown
. If you do this, make sure that$HOME/.composer/vendor/bin
is on your$PATH
.
Additionally, public-facing, browseable documentation is available at http://zend-expressive.rtfd.org.
Architectural notes are in NOTES.md.
Please see the tests for full information on capabilities.