Skip to content

Commit

Permalink
updated changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Apr 13, 2017
1 parent 6a23e9e commit a626cea
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 12 deletions.
30 changes: 26 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,44 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 0.5.0 - 2017-02-27
## [0.6.0] - 2017-04-13

### Changed

* The option `resolver()` accepts any instance of `Middlewares\Utils\CallableResolver\CallableResolverInterface`.

### Added

* New option `container()` that works as a shortcut to use a PSR-11 container as a resolver.

### Fixed

* The `405` response includes an `Allow` header with the allowed methods for the request.

## Fixed

## [0.5.0] - 2017-02-27

## Changed

* Replaced `container-interop` by `psr/container`

## 0.4.0 - 2017-02-05
## [0.4.0] - 2017-02-05

## Changed

* Updated to `middlewares/utils#~0.9`
* Improved route target resolution

## 0.3.0 - 2016-12-26
## [0.3.0] - 2016-12-26

### Changed

* Updated tests
* Updated to `http-interop/http-middleware#0.4`
* Updated `friendsofphp/php-cs-fixer#2.0`

## 0.2.0 - 2016-11-27
## [0.2.0] - 2016-11-27

### Changed

Expand All @@ -34,3 +50,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## 0.1.0 - 2016-10-09

First version

[0.6.0]: https://github.com/middlewares/fast-route/compare/v0.5.0...v0.6.0
[0.5.0]: https://github.com/middlewares/fast-route/compare/v0.4.0...v0.5.0
[0.4.0]: https://github.com/middlewares/fast-route/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/middlewares/fast-route/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/middlewares/fast-route/compare/v0.1.0...v0.2.0
4 changes: 1 addition & 3 deletions src/FastRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ public function resolver(CallableResolverInterface $resolver)
*/
public function container(ContainerInterface $container)
{
$this->resolver = new ContainerResolver($container);

return $this;
return $this->resolver(new ContainerResolver($container));
}

/**
Expand Down
5 changes: 0 additions & 5 deletions tests/FastRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public function testFastRouteOK()
new FastRoute($dispatcher),
], $request);

$this->assertInstanceOf('Psr\\Http\\Message\\ResponseInterface', $response);
$this->assertEquals('Hello oscarotero (35)', (string) $response->getBody());
}

Expand All @@ -53,7 +52,6 @@ public function testFastRouteNotFound()
new FastRoute($dispatcher),
], $request);

$this->assertInstanceOf('Psr\\Http\\Message\\ResponseInterface', $response);
$this->assertEquals(404, $response->getStatusCode());
}

Expand Down Expand Up @@ -83,7 +81,6 @@ public function testFastRouteNotAllowed()
new FastRoute($dispatcher),
], $request);

$this->assertInstanceOf('Psr\\Http\\Message\\ResponseInterface', $response);
$this->assertEquals(405, $response->getStatusCode());
$this->assertEquals('POST, PUT', $response->getHeaderLine('Allow'));
}
Expand Down Expand Up @@ -113,7 +110,6 @@ public function testFastRouteResolver()
$middleware,
], $request);

$this->assertInstanceOf('Psr\\Http\\Message\\ResponseInterface', $response);
$this->assertEquals('Hello oscarotero (35)', (string) $response->getBody());
}

Expand Down Expand Up @@ -142,7 +138,6 @@ public function testFastRouteContainerResolver()
$middleware,
], $request);

$this->assertInstanceOf('Psr\\Http\\Message\\ResponseInterface', $response);
$this->assertEquals('Hello oscarotero (35)', (string) $response->getBody());
}
}

0 comments on commit a626cea

Please sign in to comment.