Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Do not cast request handlers implementing middleware toRequestHandlerMiddleware#646

Merged
weierophinney merged 1 commit intozendframework:masterfromweierophinney:hotfix/645-container-pipeline
Nov 8, 2018
Merged

Do not cast request handlers implementing middleware toRequestHandlerMiddleware#646

weierophinney merged 1 commit intozendframework:masterfromweierophinney:hotfix/645-container-pipeline
Nov 8, 2018

Conversation

@weierophinney
Copy link
Member

Per#645,MiddlewareContainer::get() was incorrectly casting middleware that also implementedRequestHandlerInterface toRequestHandlerMiddleware. This particularly affectedZend\Stratigility\MiddlewarePipe instances, as they implement both interfaces; if the last middleware in a pipeline called on the handler, users would then encounter a "pipeline exhausted" error, because it would be invoked as a handler, and thus have no reference to the application's pipeline.

This change verifies that the request handler does not also implementMiddlewareInterface before casting.

Fixes#645

…erMiddleware`Per#645, `MiddlewareContainer::get()` was incorrectly castingmiddleware that also implemented `RequestHandlerInterface` to`RequestHandlerMiddleware`. This particularly affected`Zend\Stratigility\MiddlewarePipe` instances, as they implement bothinterfaces; if the last middleware in a pipeline called on the handler,users would then encounter a "pipeline exhausted" error, because itwould be invoked as a handler, and thus have no reference to theapplication's pipeline.This change verifies that the request handler does not also implement`MiddlewareInterface` before casting.
Copy link
Member

@michalbundyramichalbundyra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM 👍

@weierophinneyweierophinney merged commit6bad82f intozendframework:masterNov 8, 2018
weierophinney added a commit that referenced this pull requestNov 8, 2018
weierophinney added a commit that referenced this pull requestNov 8, 2018
@weierophinneyweierophinney deleted the hotfix/645-container-pipeline branchNovember 8, 2018 15:31
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

1 more reviewer

@michalbundyramichalbundyramichalbundyra approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@weierophinney@michalbundyra

[8]ページ先頭

©2009-2025 Movatter.jp