diff --git a/DynamicRouter.php b/DynamicRouter.php index 164b619d..470f19b9 100644 --- a/DynamicRouter.php +++ b/DynamicRouter.php @@ -210,10 +210,13 @@ public function supports($name) * request method is not allowed * * @deprecated Use matchRequest exclusively to avoid problems. This method will be removed in version 2.0 + * * @api */ public function match($pathinfo) { + @trigger_error(__CLASS__.'::'.__METHOD__.'() is deprecated since version 1.3 and will be removed in 2.0. Use matchRequest() instead.', E_USER_DEPRECATED); + $request = Request::create($pathinfo); if ($this->eventDispatcher) { $event = new RouterMatchEvent(); diff --git a/Tests/Routing/DynamicRouterTest.php b/Tests/Routing/DynamicRouterTest.php index f07a6fa6..5958ccba 100644 --- a/Tests/Routing/DynamicRouterTest.php +++ b/Tests/Routing/DynamicRouterTest.php @@ -136,6 +136,9 @@ public function testGetMatcher() $this->assertSame($this->matcher, $matcher); } + /** + * @group legacy + */ public function testMatchUrl() { $routeDefaults = array('foo' => 'bar'); @@ -207,6 +210,7 @@ public function testMatchRequest() /** * @expectedException \Symfony\Component\Routing\Exception\ResourceNotFoundException + * @group legacy */ public function testMatchFilter() { @@ -247,6 +251,7 @@ public function testMatchRequestFilter() /** * @expectedException \InvalidArgumentException + * @group legacy */ public function testMatchUrlWithRequestMatcher() { @@ -282,6 +287,9 @@ public function testRouteDebugMessageNonversatile() $this->assertInternalType('string', $router->getRouteDebugMessage('test')); } + /** + * @group legacy + */ public function testEventHandler() { $eventDispatcher = $this->buildMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');