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

Remove HTTP namespace #71

Merged

Conversation

weierophinney
Copy link
Member

This patch is against dev-2.0.0 and builds on #70, removing the classes and interfaces from the Zend\Stratigility\Http namespace deprecated by that patch.

Internally, this only affects MiddlewarePipe on this branch, as that class was decorating the incoming request and response at invocation; however, no other code was utilizing their features.

This patch targets the 2.0.0 release.

@weierophinney
Copy link
Member Author

Marking as a WIP until #70 is merged to develop.

This patch removes all code in the `Zend\Stratigility\Http` namespace,
and updates the `MiddlewarePipe` implementation to no longer decorate
the request and response instances with artifacts from that namespace.

In auditing tests, discovered a few locations where `$response->write()`
was being called within the tests themselves; those have been corrected
to `$response->getBody()->write()`. Additionally, code for suppressing
deprecation notices from the removed classes within test cases was
removed.
@weierophinney
Copy link
Member Author

With #70 merged, ready for review; pinging @zendframework/community-review-team , @michaelmoussa , and @xtreamwayz.

Copy link
Member

@geerteltink geerteltink left a comment

Choose a reason for hiding this comment

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

Looks good to me.

I was wondering, the WhoopsErrorHandler checks for the Zend\Stratigility\Http\Request and grabs the original request from it. But I guess if you push it first in the pipeline it already has access to the original request, before any other middleware can mess with it.

@weierophinney
Copy link
Member Author

I was wondering, the WhoopsErrorHandler checks for the Zend\Stratigility\Http\Request and grabs the original request from it. But I guess if you push it first in the pipeline it already has access to the original request, before any other middleware can mess with it.

Correct, and once we have a 1.3 version of Stratigility released, I'll update that handler to use the originalRequest attribute instead.

@michaelmoussa
Copy link
Contributor

👍 LGTM too.

@geerteltink
Copy link
Member

I really like all the changes. It makes understanding and customizing error handling a lot easier.

@weierophinney weierophinney merged commit bce8983 into zendframework:dev-2.0.0 Sep 30, 2016
weierophinney added a commit that referenced this pull request Sep 30, 2016
@weierophinney weierophinney deleted the feature/deprecator-removal branch September 30, 2016 17:58
@weierophinney
Copy link
Member Author

With this in place, I've updated the branch-aliases across all branches to:

  • dev-master => 1.2.x-dev
  • dev-develop => 1.3.0-dev
  • dev-dev-2.0.0 => 2.0.0-dev

As such, you should be able to test against the upcoming 1.3 or 2.0 versions using appropriate constraints (e.g., ^1.3.0@dev, ^2.0.0@dev).

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

Successfully merging this pull request may close these issues.

None yet

3 participants