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

Stratigility 1.2.0

Compare
Choose a tag to compare
@weierophinney weierophinney released this 17 Mar 15:32
· 650 commits to master since this release

This release contains two potential backwards compatibility breaks:

  • In versions prior to 1.2.0, after Zend\Stratigility\Http\Response::end() was called, with*() operations were performed as no-ops, which led to hard-to-detect errors. Starting with 1.2.0, they now raise a RuntimeException.
  • In versions prior to 1.2.0, Zend\Stratigility\FinalHandler always provided exception details in the response payload for errors. Starting with 1.2.0, it only does so if not in a production environment (which is the default environment).

Added

  • #36 adds a new InvalidMiddlewareException, with the static factory fromValue() that provides an exception message detailing the invalid type. MiddlewarePipe now throws this exception from the pipe() method when a non-callable value is provided.
  • #46 adds FinalHandler::setOriginalResponse(), allowing you to alter the response used for comparisons when the FinalHandler is invoked.
  • #37 and #49 add support in Zend\Stratigility\Dispatch to catch PHP 7 Throwables.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • #30 updates the Response implementation to raise exceptions from with*() methods if they are called after end().
  • #46 fixes the behavior of FinalHandler::handleError() to only display exception details when not in production environments, and changes the default environment to production.