# Changelog

All notable changes to this project will be documented in this file, in reverse chronological order by release.

## 2.2.0 - 2016-12-23

### Added

- [#30](https://github.com/zendframework/zend-expressive-helpers/pull/30) Use new ZF coding standard
- [#31](https://github.com/zendframework/zend-expressive-helpers/pull/32) Check to ensure 100% test coverage is retained

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- Nothing.

## 2.1.1 - 2016-12-23

### Added

- Nothing.

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- [#29](https://github.com/zendframework/zend-expressive-helpers/pull/29) Don't throw exception on empty JSON body

## 2.1.0 - 2016-10-02

### Added

- [#19](https://github.com/zendframework/zend-expressive-helpers/pull/19) FormUrlEncodedStrategy parses raw
  request bodies, if needed.

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- [#22](https://github.com/zendframework/zend-expressive-helpers/pull/22) updates JsonStrategy test suite to
  function with both the `json` and `jsonc` extensions

## 2.0.3 - 2016-09-01

### Added

- Nothing.

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- [#21](https://github.com/zendframework/zend-expressive-helpers/pull/21) Respond with 400 on bad JSON input

## 2.0.2 - 2016-08-20

### Added

- Nothing.

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- [#15](https://github.com/zendframework/zend-expressive-helpers/pull/15) URLs
  generated by `UrlHelper` will always include the `$basePath` if one is set.

## 2.0.1 - 2016-08-17

### Added

- Nothing.

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- [#18](https://github.com/zendframework/zend-expressive-helpers/pull/18) parsing
  request body with the `JsonStrategy` will implicitly rewind the stream in order
  to parse the entire body, rather than just parsing the remaining contents.

## 2.0.0 - 2017-01-18

### Added

- Nothing.

### Deprecated

- Nothing.

### Removed

- [#7](https://github.com/zendframework/zend-expressive-helpers/pull/7) removes
  the `RouteResultObserverInterface` implementation from `UrlHelper`. This also
  means that the `UrlHelperMiddleware` no longer registers the `UrlHelper` as a
  route result observer, but instead just injects it with the `RouteResult`
  present as a request attribute, if any.

### Fixed

- Nothing.

## 1.4.0 - 2016-01-01

### Added

- [#6](https://github.com/zendframework/zend-expressive-helpers/pull/6) adds base
  path support to the `UrlHelper`. Middleware may now call
  `UrlHelper::setBasePath()` on an instance to set the path prefix to add to all
  URIs generated by the helper, which is often useful when working in an
  environment where the application is in a subdirectory, or where you wish to
  use a version or locale prefix to all paths. You may clear the base path by
  passing an empty string to the `setBasePath()` method.

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- Nothing.

## 1.3.0 - 2015-12-22

### Added

- [#3](https://github.com/zendframework/zend-expressive-helpers/pull/3) and
  [#5](https://github.com/zendframework/zend-expressive-helpers/pull/5) add
  a new `Zend\Expressive\Helper\BodyParams\BodyParamsMiddleware` for use in
  parsing the request body. The middleware consumes strategies, which match
  against the `Content-Type` header, and, if matched, parse the body and return
  a new request with the parsed body parameters.

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- Nothing.

## 1.2.2 - TBD

### Added

- Nothing.

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- Nothing.

## 1.2.1 - 2015-12-22

### Added

- [#4](https://github.com/zendframework/zend-expressive-helpers/pull/4) adds the
  protected method `getRouteResult()`, providing extending classes access to the
  private `$result` member.

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- Nothing.

## 1.2.0 - 2015-12-08

### Added

- [#2](https://github.com/zendframework/zend-expressive-helpers/pull/2) adds the
  following classes:
  - `UrlHelperMiddleware`, which accepts a `UrlHelper` instance and a
    `RouteResultSubjectInterface` instance; during invocation, it attaches the
    helper to the subject as an observer.
  - `UrlHelperMiddlewareFactory`, which creates a `UrlHelperMiddleware` instance
    from the registered `UrlHelper` and `RouteResultSubjectInterface` (or
    `Application`) instances.

### Deprecated

- Nothing.

### Removed

- [#2](https://github.com/zendframework/zend-expressive-helpers/pull/2) removes
  registration of the generated `UrlHelper` with the `Application` instance
  within the `UrlHelperFactory`. This change was made to observed race
  conditions when the `UrlHelper` is created within the context of the
  `ApplicationFactory` (e.g., when generating a `TemplatedErrorHandler`
  instance).

### Fixed

- Nothing.

## 1.1.0 - 2015-12-06

### Added

- [#1](https://github.com/zendframework/zend-expressive-helpers/pull/1) adds a
  dependency on zendframework/zend-expressive-router, which replaces the
  dependency on zendframework/zend-expressive. This change means the component
  can be used without Expressive, and also removes a potential circular
  dependency issue in consumers of the package.

### Deprecated

- Nothing.

### Removed

- [#1](https://github.com/zendframework/zend-expressive-helpers/pull/1) removes
  the zendframework/zend-expressive, replacing it with a dependency on
  zendframework/zend-expressive-router.

### Fixed

- Nothing.

## 1.0.0 - 2015-12-04

Initial release.

### Added

- `Zend\Expressive\Helper\UrlHelper` provides the ability to generate a URI path
  based on a given route defined in the `Zend\Expressive\Router\RouterInterface`.
  If registered as a route result observer, and the route being used was also
  the one matched during routing, you can provide a subset of routing
  parameters, and any not provided will be pulled from those matched.
- `Zend\Expressive\Helper\ServerUrlHelper` provides the ability to generate a
  full URI by passing only the path to the helper; it will then use that path
  with the current `Psr\Http\Message\UriInterface` instance provided to it in
  order to generate a fully qualified URI.
- `Zend\Expressive\Helper\ServerUrlMiddleware` is pipeline middleware that can
  be registered with an application; it will inject a `ServerUrlHelper` instance
  with the URI composed in the provided `ServerRequestInterface` instance.
- The package also provides factories compatible with container-interop that can
  be used to generate instances.

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- Nothing.
