Skip to content

Tags: phly/conduit

Tags

0.15.2

Toggle 0.15.2's commit message
Conduit 0.15.2

Added
-----

- Nothing.

Deprecated
----------

- Nothing.

Removed
-------

- Nothing.

Fixed
-----

- Modified `composer.json` to *require* only `psr/http-message`, *suggest*
  `psr/http-message-implementation`, and, in *development*, require `phly/http`;
  this allows substitution of PSR-7 implementations.

0.15.1

Toggle 0.15.1's commit message
Conduit 0.15.1

Added
-----

- Nothing.

Deprecated
----------

- Nothing.

Removed
-------

- Nothing.

Fixed
-----

- [#41](#41) Simplified logic when
  determining "final" handler to execute.

0.15.0

Toggle 0.15.0's commit message
Conduit 0.15.0

This release updates Conduit to use phly/http 0.12, containing updates to the
PSR-7 specification as of 13 April 2015. The specifics that affect Conduit include:

- `RequestInterface::withUri()` now has an additional parameter,
  `$preserveHost`; when `false` (the default), the request's `Host` header is
  updated with the host component of the provided URI; this affected the
  `Phly\Conduit\Http\Request` definition.
- `StreamableInterface` was renamed to `StreamInterface`. This affected both the
  `Phly\Conduit\Http\Request` and `Phly\Conduit\Http\Response` definitions.
- `UriInterface` now allows both relative and empty paths.

This last forced a BC break in Conduit, as the previous behavior was that paths
MUST be prefixed with `/`. As a result, `MiddlewarePipe` now normalizes paths to
always prepend a `/`, and to trim any trailing `/` characters.

Added
-----

- Nothing.

Deprecated
----------

- Nothing.

Removed
-------

- Nothing.

Fixed
-----

- [#39](#39) PSR-7 "Review 2" support.

0.14.1

Toggle 0.14.1's commit message
Conduit 0.14.1

Added
-----

- Nothing.

Deprecated
----------

- Nothing.

Removed
-------

- Nothing.

Fixed
-----

- [#37](#37) Improved install instructions.
- [#38](#38) Fixed URI path extraction
  examples.
- [#38](#38) Added more tests to ensure pipe
  path is trimmed from URI.

0.14.0

Toggle 0.14.0's commit message
Conduit 0.14.0

This release updates its dependencies to use psr/http-message >= 0.9.0 and
phly/http >= 0.11.0. The primary changes that affect Conduit regard changes to
`Psr\Http\Message\ServerRequestInterface`, which required method name and
signature changes in `Phly\Conduit\Http\Request`.

Added
-----

- `Phly\Conduit\Http\Request::getParsedBody()` (replaces `getBodyParams()`).
- `Phly\Conduit\Http\Request::withParsedBody()` (replaces `withBodyParams()`).

Deprecated
----------

- Nothing.

Removed
-------

- `Phly\Conduit\Http\Request::getBodyParams()` (replaced by `getParsedBody()`).
- `Phly\Conduit\Http\Request::withBodyParams()` (replaced by `withParsedBody()`).

Fixed
-----

- [#34](#34) Remove unused variable from
  test bootstrap.
- [#35](#35) Rename `phpunit.xml` to
  `phpunit.xml.dist`.

0.13.0

Toggle 0.13.0's commit message
Conduit 0.13.0

This release updates its dependencies to use psr/http-message >= 0.8.0 and
phly/http >= 0.10.0. The primary changes that affect Conduit regard changes to
`Psr\Http\Message\RequestInterface` and the renaming of
`Psr\Http\Message\UriTargetInterface` to `Psr\Http\Message\UriInterface`, which
required changes in `Phly\Conduit\Http\Request`.

Added
-----

- `Phly\Conduit\Http\Request::getRequestTarget()`, to fetch the request-target.
- `Phly\Conduit\Http\Request::withRequestTarget()`, to allow creating a new
  instance with the specified request-target, allowing developers to set a
  non-origin-form request-target.

Deprecated
----------

- Nothing.

Removed
-------

- Nothing.

Fixed
-----

- `Phly\Conduit\Http\Request` now typehints against
  `Psr\Http\Message\UriInterface` for methods dealing with the URI.

0.12.0

Toggle 0.12.0's commit message
Conduit 0.12.0

This release makes one backwards-incompatible change: Due to the changes in
0.11.0, the `$done` callable to a `Next` instance **MUST** use the same
signature as `Next::__invoke()`. This is due to the fact that a `MiddlewarePipe`
instance will pass a `Next` instance to its children; if the signature is not
the same, the arguments are not provided in the correct order when returning to
the parent.

The BC break that occurs is in the signature of `FinalHandler::_invoke()`, which
has been changed to mimic that of `Next::__invoke()`.

Added
-----

- Updated to phly/http 0.9.0.

Deprecated
----------

- Nothing.

Removed
-------

- Nothing.

Fixed
-----

- `Next::__invoke()` now calls its `$done` instance using the same arguments and same order
  in which it received its own.
- `FinalHandler::__invoke()` now implements the same signature as
  `Next::__invoke()`.

0.11.0

Toggle 0.11.0's commit message
Conduit 0.11.0

This release makes several backwards-incompatible changes.

- `Middleware` was renamed to `MiddlewarePipe`. Otherwise, the behavior is
  exactly the same.
- `Next` was rewritten to have a consistent invocable signature:
  `function (ServerRequestInterface $request, ResponseInterface $response, $err = null)`
  This change simplifies the logic, removes bugs caused by edge cases, and leads
  to consistent usage that's easier to remember.

Added
-----

- `Phly\Conduit\MiddlewareInterface`, which provides an interface to typehint
  against for middleware. It's usage is not enforced (only a callable is
  required), but `Phly\Conduit\Dispatch` contains optimizations based on the
  interface.
- `Phly\Conduit\ErrorMiddlewareInterface`, which provides an interface to typehint
  against for error-handling middleware. It's usage is not enforced (only a
  callable with arity 4 is required), but `Phly\Conduit\Dispatch` contains
  optimizations based on the interface.
- `Phly\Conduit\MiddlewarePipe` (replaces by `Phly\Conduit\Middleware`).

Deprecated
----------

- Nothing.

Removed
-------

- `Phly\Conduit\Next::__construct` no longer accepts the `$request` or
  `$response` arguments, as the values are no longer stored internally.
- `Phly\Conduit\Middleware` (replaced by `Phly\Conduit\MiddlewarePipe`).

Fixed
-----

- `MiddlewarePipe` was updated to use an `SplQueue` instance internally for
  modeling the middleware pipeline.
- Properly fixes problems in `Next` reported in [#25](https://github.com/phly/http/pull/25),
  [#26](phly/http#26), [#27](phly/http#27),
  and [#28](phly/http#28), which all revolve around
  resetting the path when trailing slashes are or are not present.

0.10.2

Toggle 0.10.2's commit message
Conduit 0.10.2

Added
-----

- Nothing.

Deprecated
----------

- Nothing.

Removed
-------

- Nothing.

Fixed
-----

- The logic in `Next` was updated to ensure that if a trailing slash was present
  in the path, but not the route, resetting the request URI path retains it.

0.10.1

Toggle 0.10.1's commit message
Conduit 0.10.1

Added
-----

- Nothing.

Deprecated
----------

- Nothing.

Removed
-------

- Nothing.

Fixed
-----

- The logic in `Middleware` was changed to store the route as provided, without
  stripping the trailing slash. This allows matching with or without it.
- The logic in `Next` was updated to ensure that if a trailing slash was present
  in the route, resetting the request URI path retains it; alternately, if none
  was present, it is omitted.