From 02e77ec4e373ae3e6b5d15b3b3e05deb0bf6d698 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 17 May 2011 10:11:27 +0200 Subject: [PATCH] [Routing] moved Matcher exceptions --- UPDATE.md | 14 +++++++++++++ .../FrameworkBundle/RequestListener.php | 4 ++-- .../Exception/MethodNotAllowedException.php | 2 +- .../Exception/NotFoundException.php | 2 +- .../Routing/Matcher/ApacheUrlMatcher.php | 2 +- .../Matcher/Dumper/PhpMatcherDumper.php | 4 ++-- .../Routing/Matcher/Exception/Exception.php | 21 ------------------- .../Matcher/RedirectableUrlMatcher.php | 2 +- .../Component/Routing/Matcher/UrlMatcher.php | 4 ++-- .../Routing/Fixtures/dumper/url_matcher1.php | 4 ++-- .../Routing/Fixtures/dumper/url_matcher2.php | 4 ++-- .../Routing/Matcher/UrlMatcherTest.php | 4 ++-- 12 files changed, 30 insertions(+), 37 deletions(-) rename src/Symfony/Component/Routing/{Matcher => }/Exception/MethodNotAllowedException.php (94%) rename src/Symfony/Component/Routing/{Matcher => }/Exception/NotFoundException.php (89%) delete mode 100644 src/Symfony/Component/Routing/Matcher/Exception/Exception.php diff --git a/UPDATE.md b/UPDATE.md index 844d44cfc510..c1fa4e740fcb 100644 --- a/UPDATE.md +++ b/UPDATE.md @@ -9,6 +9,20 @@ timeline closely anyway. beta1 to beta2 -------------- +* The Routing Exceptions have been moved: + + Before: + + Symfony\Component\Routing\Matcher\Exception\Exception + Symfony\Component\Routing\Matcher\Exception\NotFoundException + Symfony\Component\Routing\Matcher\Exception\MethodNotAllowedException + + After: + + Symfony\Component\Routing\Exception\Exception + Symfony\Component\Routing\Exception\NotFoundException + Symfony\Component\Routing\Exception\MethodNotAllowedException + * The ``error_handler`` setting has been removed. The ``ErrorHandler`` class is now managed directly by Symfony SE in ``AppKernel``. diff --git a/src/Symfony/Bundle/FrameworkBundle/RequestListener.php b/src/Symfony/Bundle/FrameworkBundle/RequestListener.php index c5c08d035067..9b37913b9e35 100644 --- a/src/Symfony/Bundle/FrameworkBundle/RequestListener.php +++ b/src/Symfony/Bundle/FrameworkBundle/RequestListener.php @@ -18,8 +18,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\Routing\Matcher\Exception\MethodNotAllowedException; -use Symfony\Component\Routing\Matcher\Exception\NotFoundException; +use Symfony\Component\Routing\Exception\MethodNotAllowedException; +use Symfony\Component\Routing\Exception\NotFoundException; use Symfony\Component\Routing\RouterInterface; use Symfony\Component\Routing\RequestContext; diff --git a/src/Symfony/Component/Routing/Matcher/Exception/MethodNotAllowedException.php b/src/Symfony/Component/Routing/Exception/MethodNotAllowedException.php similarity index 94% rename from src/Symfony/Component/Routing/Matcher/Exception/MethodNotAllowedException.php rename to src/Symfony/Component/Routing/Exception/MethodNotAllowedException.php index 88f3a71abafa..dea23b95226c 100644 --- a/src/Symfony/Component/Routing/Matcher/Exception/MethodNotAllowedException.php +++ b/src/Symfony/Component/Routing/Exception/MethodNotAllowedException.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\Routing\Matcher\Exception; +namespace Symfony\Component\Routing\Exception; /** * The resource was found but the request method is not allowed. diff --git a/src/Symfony/Component/Routing/Matcher/Exception/NotFoundException.php b/src/Symfony/Component/Routing/Exception/NotFoundException.php similarity index 89% rename from src/Symfony/Component/Routing/Matcher/Exception/NotFoundException.php rename to src/Symfony/Component/Routing/Exception/NotFoundException.php index 093611c3560f..24b2da017429 100644 --- a/src/Symfony/Component/Routing/Matcher/Exception/NotFoundException.php +++ b/src/Symfony/Component/Routing/Exception/NotFoundException.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Component\Routing\Matcher\Exception; +namespace Symfony\Component\Routing\Exception; /** * The resource was not found. diff --git a/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php b/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php index 71252c81b114..cbe26b4f59ab 100644 --- a/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php +++ b/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Routing\Matcher; -use Symfony\Component\Routing\Matcher\Exception\MethodNotAllowedException; +use Symfony\Component\Routing\Exception\MethodNotAllowedException; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php index 6b1bae069e95..c4141e1c3d1f 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php @@ -206,8 +206,8 @@ private function startClass($class, $baseClass) return << - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Routing\Matcher\Exception; - -/** - * A matching exception. - * - * @author Kris Wallsmith - */ -interface Exception -{ -} diff --git a/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php b/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php index e18ea8df2f9e..4de1c6475f37 100644 --- a/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php +++ b/src/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Routing\Matcher; -use Symfony\Component\Routing\Matcher\Exception\NotFoundException; +use Symfony\Component\Routing\Exception\NotFoundException; /** * @author Fabien Potencier diff --git a/src/Symfony/Component/Routing/Matcher/UrlMatcher.php b/src/Symfony/Component/Routing/Matcher/UrlMatcher.php index 84691b7fe391..6aa0dd8fefc7 100644 --- a/src/Symfony/Component/Routing/Matcher/UrlMatcher.php +++ b/src/Symfony/Component/Routing/Matcher/UrlMatcher.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Routing\Matcher; -use Symfony\Component\Routing\Matcher\Exception\MethodNotAllowedException; -use Symfony\Component\Routing\Matcher\Exception\NotFoundException; +use Symfony\Component\Routing\Exception\MethodNotAllowedException; +use Symfony\Component\Routing\Exception\NotFoundException; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\RequestContext; diff --git a/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher1.php b/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher1.php index 000c9dd4a34a..b1bbee837a9d 100644 --- a/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher1.php +++ b/tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher1.php @@ -1,7 +1,7 @@