This repository was archived by the owner on Jan 29, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +34
-4
lines changed Expand file tree Collapse file tree 4 files changed +34
-4
lines changed Original file line number Diff line number Diff line change 22
33All notable changes to this project will be documented in this file, in reverse chronological order by release.
44
5+ ## 3.0.0alpha7 - 2018-02-14
6+
7+ ### Added
8+
9+ - Nothing.
10+
11+ ### Changed
12+
13+ - [ #556 ] ( https://github.com/zendframework/zend-expressive/pull/556 ) modifies the
14+ ` ApplicationFactory ` such that it now uses the
15+ ` Zend\Expressive\ROUTE_MIDDLEWARE ` constant in order to retrieve the
16+ ` Zend\Expressive\Router\Middleware\PathBasedRoutingMiddleware ` instance.
17+ This is done to help smooth upgrades from v2 to v3, as it prevents a manual
18+ step when updating the ` config/pipeline.php ` , and ensures that the instance
19+ composed in the application is the same instance piped to the application.
20+
21+ ### Deprecated
22+
23+ - Nothing.
24+
25+ ### Removed
26+
27+ - Nothing.
28+
29+ ### Fixed
30+
31+ - Nothing.
32+
533## 3.0.0alpha6 - 2018-02-14
634
735### Added
Original file line number Diff line number Diff line change 1313use Zend \Expressive \Application ;
1414use Zend \Expressive \ApplicationPipeline ;
1515use Zend \Expressive \MiddlewareFactory ;
16- use Zend \Expressive \Router \Middleware \PathBasedRoutingMiddleware ;
1716use Zend \HttpHandlerRunner \RequestHandlerRunner ;
1817
18+ use const Zend \Expressive \ROUTE_MIDDLEWARE ;
19+
1920/**
2021 * Create an Application instance.
2122 *
@@ -35,7 +36,7 @@ public function __invoke(ContainerInterface $container) : Application
3536 return new Application (
3637 $ container ->get (MiddlewareFactory::class),
3738 $ container ->get (ApplicationPipeline::class),
38- $ container ->get (PathBasedRoutingMiddleware::class ),
39+ $ container ->get (ROUTE_MIDDLEWARE ),
3940 $ container ->get (RequestHandlerRunner::class)
4041 );
4142 }
Original file line number Diff line number Diff line change 7070 * Should resolve to the Zend\Expressive\Router\Middleware\PathBasedRoutingMiddleware
7171 * service.
7272 *
73- * @deprecated To remove in version 4.0.0.
7473 * @var string
7574 */
7675const ROUTE_MIDDLEWARE = __NAMESPACE__ . '\Middleware\RouteMiddleware ' ;
Original file line number Diff line number Diff line change 1919use Zend \HttpHandlerRunner \RequestHandlerRunner ;
2020use Zend \Stratigility \MiddlewarePipeInterface ;
2121
22+ use const Zend \Expressive \ROUTE_MIDDLEWARE ;
23+
2224class ApplicationFactoryTest extends TestCase
2325{
2426 public function testFactoryProducesAnApplication ()
@@ -31,7 +33,7 @@ public function testFactoryProducesAnApplication()
3133 $ container = $ this ->prophesize (ContainerInterface::class);
3234 $ container ->get (MiddlewareFactory::class)->willReturn ($ middlewareFactory );
3335 $ container ->get (ApplicationPipeline::class)->willReturn ($ pipeline );
34- $ container ->get (PathBasedRoutingMiddleware::class )->willReturn ($ routeMiddleware );
36+ $ container ->get (ROUTE_MIDDLEWARE )->willReturn ($ routeMiddleware );
3537 $ container ->get (RequestHandlerRunner::class)->willReturn ($ runner );
3638
3739 $ factory = new ApplicationFactory ();
You can’t perform that action at this time.
0 commit comments