The process of using the Middleware

@voltan,
did you find applicable way?

@ocramius,
i have legacy app on ZF2, which i upgraded to ZF3.

simple flow for 1 route:

1. request for reset-password
2. middleware, which attaches business-logic (synchronize passwords, logging and etc)
3. vendor-code in controller's action processes reset-password's logic

so middleware looks the best place for this 1 route, which will be used rarely. so we don’t have any overhead with logic for others 100 routes.

i used it in ZF2 as code to run before controller’s action and as for me it is the most useful thing.
now after upgrade i see that middleware doesn’t work in the same way… i spent 1 day to read different information and still don’t see some strict deprecation notice in the documentation…

very strange situation.
i have big controllers and don’t want to break each action into separate RequestHandler.

questions:

  1. am i correctly understand that it was killed flow, when middleware could work before controller’s action? WHY?
  2. if YES - what is suggested ways to replace such logic in the new way?

thanks!

UPD. moved into new topic Middleware with Controller Action