Open boesing opened 5 years ago
We can do this by doing the following:
ErrorHandler
extend it. The constructor can then emit an E_USER_DEPRECATION
message indicating the new name, and how to configure it.Please feel free to submit a PR against develop to accomplish the first step.
I like the idea of providing that new ErrorMiddleware
.
I am not sure if triggering a deprecation message is a good idea.
As of zend-expressive
, the ErrorHandler
is being automatically set to the configuration.
So after updating zend-stratigility
, every zend-expressive
project will receive deprecation messages.
I would rather implement just a @deprecated
tag, so that the handler can be safely removed in v4 instead.
A migration guide should probably mention that the registered delegators
should attach the listeners to the new middleware, as just "aliasing" wont be enough. (Some more details can be found in this comment https://github.com/zendframework/zend-mvc/pull/294#issuecomment-421050228)
I will provide a PR shortly with the changes.
This repository has been closed and moved to laminas/laminas-stratigility; a new issue has been opened at https://github.com/laminas/laminas-stratigility/issues/3.
Hey there,
I am giving some trainings regarding zend-expressive, e.g. for some colleagues. One thing, which always came back to me as a question was:
Why is the
ErrorHandler
calledErrorHandler
like all those request handlers and notErrorMiddleware
which actually suits better as its a middleware per definition.Would like to see the next major version where the
ErrorHandler
is renamed toErrorMiddleware
.Any thoughts on this?