jdriscoll / celery
A very lightweight implementation of PSR-7
v1.3.0
2019-06-16 10:59 UTC
Requires
- php: ^7.1
- psr/http-message: ^1.0
Requires (Dev)
- nikic/fast-route: ^1.2
- phpunit/phpunit: ^7.0
- slim/slim: ^3.12
README
A typical lightweight PHP service takes 70ms loading the PHP includes it requires when a request starts, then less than 1ms handling trivial requests or 7ms handling a request that requires database usage. In 70ms, an average CPU has had time to execute about 140,000,000 instructions, far more than a web service could reasonably use!
That's silly.
So instead of wasting all that time - not to mention the carbon needed for the energy - starting up, this helps you reduce it by keeping the HTTP framework part of that startup cost down.
Compatibility
The following should be compatible with typical use-cases in Slim:
- any()
- delete()
- get()
- group()
- map()
- post()
- put()
- run()
- Error condition handlers (errorHandler, phpErrorHandler, notFoundHandler, notAllowedHandler) as added via plain array passed to the constructor