rapila / cms-base

The rapila cms’ internals. Please file all issues here if they’re not directly related to a plugin or the sample site.

Home Page:http://www.rapi.la

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use PSR-7

sabberworm opened this issue · comments

PSR-7 is a new standard API to deal with HTTP. Instead of relying on globals like $_REQUEST, $_POST, php://input for input and print, echo, die, <?= for output, it uses request and response objects.

This has the following benefits:

  • Allows end-to-end unit tests with mock request and responses
  • Allows internal redirects/internal requests (e.g. for updating the search index)
  • Allows a single PHP process to serve more than one request (interfacing with tools like RoadRunner)
  • Would make the rapila bootstrap more pluggable, e.g. using middleware