Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Renaming ErrorHandler to ErrorHandlerMiddleware #191

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

Renaming ErrorHandler to ErrorHandlerMiddleware #191

wants to merge 6 commits into from

Conversation

boesing
Copy link
Member

@boesing boesing commented Aug 19, 2019

As already mentioned in #190, 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.

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`.
@boesing boesing changed the base branch from master to develop August 19, 2019 12:18
@boesing
Copy link
Member Author

boesing commented Oct 1, 2019

/cc @weierophinney @webimpress

@michalbundyra michalbundyra added this to the 3.3.0 milestone Oct 1, 2019
@michalbundyra
Copy link
Member

@boesing I think there might be some references to this class in the documentation so we need update it. Other than that LGTM 👍

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-stratigility; a new issue has been opened at laminas/laminas-stratigility#2.

@weierophinney
Copy link
Member

This repository has been moved to laminas/laminas-stratigility. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:

  • Squash all commits in your branch (git rebase -i origin/{branch})
  • Make a note of all changed files (`git diff --name-only origin/{branch}...HEAD
  • Run the laminas/laminas-migration tool on the code.
  • Clone laminas/laminas-stratigility to another directory.
  • Copy the files from the second bullet point to the clone of laminas/laminas-stratigility.
  • In your clone of laminas/laminas-stratigility, commit the files, push to your fork, and open the new PR.
    We will be providing tooling via laminas/laminas-migration soon to help automate the process.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants