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

Deprecate Http subnamespace #70

Commits on Sep 29, 2016

  1. Configuration menu
    Copy the full SHA
    f526401 View commit details
    Browse the repository at this point in the history
  2. Added OriginalMessages middleware

    When invoked, injects attributes into the request for each of:
    
    - originalUri
    - originalRequest
    - originalResponse
    
    and passes the new request on to `$next()`.
    
    Updated Http\Request to:
    
    - inject the `originalRequest` attribute into the stored "PSR" request,
      ensuring that access to that attribute will return the original
      request.
    
    Updated FinalHandler:
    
    - to check for the `originalRequest` attribute, instead of testing for
      `Http\Request` and calling `getOriginalRequest()`.
    - to no longer cast the response to `Http\Response` when writing content
      to it; it now writes to the response body directly.
    - to cast responses to `Http\Response` prior to triggering the `onerror`
      handler; this is done to ensure types remain the same, in case
      developers typehint on the Stratigility message types in their
      handlers.
    
    Finally, updated the request/response class-level docblocks to refer to
    the `OriginalMessages` middleware as a means for injecting the
    attributes containing the original artifacts.
    weierophinney committed Sep 29, 2016
    Configuration menu
    Copy the full SHA
    1362559 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    08cb6b3 View commit details
    Browse the repository at this point in the history
  4. Trigger deprecation notices for request, response decorator method in…

    …vocations
    
    This patch updates the codebase to trigger deprecation notices when
    invoking the various custom methods in the request and response
    decorators. The notices detail why they are triggered, how to avoid
    them, and link to relevant migration documentation.
    
    Some tests needed updates. In particular, any tests that might produce
    Stratigility HTTP message artifacts were updated to expect the
    deprecation notices and skip over them if discovered. In a few cases,
    methods from the messages were exercised by tests, and these were
    updated to no longer do so.
    
    A few expectations were also made on the Stratigility HTTP message
    types; these were updated to the looser PSR-7 message types.
    weierophinney committed Sep 29, 2016
    Configuration menu
    Copy the full SHA
    227406f View commit details
    Browse the repository at this point in the history