-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Renaming ErrorHandler to ErrorHandlerMiddleware #7
Renaming ErrorHandler to ErrorHandlerMiddleware #7
Conversation
The `ErrorMiddleware` is just a drop-in replacement for the `ErrorHandler` to solve a naming conflict. As the `ErrorHandler` is implementing the `MiddlewareInterface`, it supposed to be called `ErrorMiddleware` instead.
The `ErrorHandler` should be removed in v4.
By just extending the `ErrorMiddleware`, we can remove the dedicated unit test and the duplicated code for the `ErrorHandler`
Actually, its an error handling middleware. Renaming to `ErrorHandlerMiddleware` is more beneficial as just `ErrorMiddleware`.
I disagree with the change. Name does not say that it is a request handler but that it is an error handler, it handles errors. While |
@Xerkus As I've already tried to explain in zendframework/zend-stratigility#190, its not about what we as the creators of this package think is "enough" but what my workshop attendees do. I understand why you think so but I still think this is a useful change to make things more clear. Just a sidenote: the |
This re-opens zendframework/zend-stratigility#191 and handles #2
Summary
As already mentioned in zendframework/zend-stratigility#190 (migrated to #3), there is a naming conflict in the ErrorHandler.
I had some feedback of trainees which asked me, why the ErrorHandler ain't a RequestHandler, as its name says.
That made me think about the naming and I realized, its just because of the missing Middleware postfix.
However, I'd like to rename the ErrorHandler to ErrorHandlerMiddleware to avoid future confusions about where the difference between RequestHandlerInterface and MiddlewareInterface is.