On Wed, May 10, 2017 at 1:54 PM, Rasmus Schultz <ras...@mindplay.dk> wrote:

> In my opinion, if a middleware component doesn't work when taken out of
> context from other middleware, or is dependent on related middleware and
> execution order etc., it's no longer middleware, strictly speaking - at
> that point, you're overloading the middleware mechanism with
> responsibilities that don't belong to that domain and don't naturally fit
> there.


That's purely an opinion and I definitely don't agree about the execution
order. Would this make sense:

middleware = [
  ActionHandler,
  ClientIp,
  Authorization,
]

Of course not! Some middleware will always need to be early or late in
processing. Authentication and authorization will need to be early, and
action handling will need to be late. I don't think it is at all natural to
say "all middleware must be context free and middleware order never
matters". That's simply unrealistic.

--
Woody Gilk
http://about.me/shadowhand

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/CAGOJM6%2BKW4nFeyMb07%3DGvY0C9nj9ChtrCe8cHLAiJJs%3DPwjd-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to