prooph / event-store-http-api

Prooph EventStore HTTP API
http://getprooph.org/
BSD 3-Clause "New" or "Revised" License
18 stars 3 forks source link

Use zend strategility + FastRoute only #1

Closed codeliner closed 8 years ago

codeliner commented 8 years ago

We're working on new PHP based microservices in our current project and it points out that zend-strategility is enough for API-only microservices. zend-expressive is small, but already adds boilerplate that you don't need if you don't want to change the router implementation every 3 month or have to orchestrate a lot of middleware (which would result in the next monolith).

Here is an example of what we're doing: https://gist.github.com/codeliner/42b92174652af6c984170a8a1f9adb14

Only the public/index.php and config/router.php are different than prooph-do. config/autoload + zend-servicemanager set up are the same and also the Http-Action-Middlewares, except that they don't have the third parameter $next in the signature because they are responsible for handling the http requests.

Thoughts?

prolic commented 8 years ago

sounds good. can you submit a PR? I like to work more on the "real" problems, first :)

codeliner commented 8 years ago

not this week ;) just wanted to have the RFC in place, but in two weeks or so yes.

prolic commented 8 years ago

nice

codeliner commented 8 years ago

I'm closing the RFC. We need expressive here to allow easy extension of the service. One may want to add authentication to secure the http-api and therefor needs to register an auth middleware. expressive is made for this, so we should keep it.