File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1111
1212- Use ` phpstan ` as a dev dependency to detect bugs
1313
14+ ### Added
15+
16+ - Added ` responseFactory ` option to ` __construct `
17+
1418## [ 1.1.0] - 2018-08-04
1519
1620### Added
Original file line number Diff line number Diff line change 44namespace Middlewares ;
55
66use Middlewares \Utils \Traits \HasResponseFactory ;
7+ use Middlewares \Utils \Factory ;
8+ use Psr \Http \Message \ResponseFactoryInterface ;
79use Psr \Http \Message \ResponseInterface ;
810use Psr \Http \Message \ServerRequestInterface ;
911use Psr \Http \Server \MiddlewareInterface ;
@@ -26,9 +28,10 @@ class TrailingSlash implements MiddlewareInterface
2628 /**
2729 * Configure whether add or remove the slash.
2830 */
29- public function __construct (bool $ trailingSlash = false )
31+ public function __construct (bool $ trailingSlash = false , ResponseFactoryInterface $ responseFactory = null )
3032 {
3133 $ this ->trailingSlash = $ trailingSlash ;
34+ $ this ->responseFactory = $ responseFactory ?: Factory::getResponseFactory ();
3235 }
3336
3437 /**
You can’t perform that action at this time.
0 commit comments