浏览代码

[Routing] moved Matcher exceptions

Fabien Potencier 14 年之前
父节点
当前提交
02e77ec4e3

+ 14 - 0
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``.
 

+ 2 - 2
src/Symfony/Bundle/FrameworkBundle/RequestListener.php

@@ -18,8 +18,8 @@ use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
 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;
 

+ 1 - 1
src/Symfony/Component/Routing/Matcher/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.

+ 1 - 1
src/Symfony/Component/Routing/Matcher/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.

+ 1 - 1
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;
 

+ 2 - 2
src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php

@@ -206,8 +206,8 @@ EOF
         return <<<EOF
 <?php
 
-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\RequestContext;
 
 /**

+ 0 - 21
src/Symfony/Component/Routing/Matcher/Exception/Exception.php

@@ -1,21 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * 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 <kris@symfony.com>
- */
-interface Exception
-{
-}

+ 1 - 1
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 <fabien@symfony.com>

+ 2 - 2
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;

+ 2 - 2
tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher1.php

@@ -1,7 +1,7 @@
 <?php
 
-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\RequestContext;
 
 /**

+ 2 - 2
tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher2.php

@@ -1,7 +1,7 @@
 <?php
 
-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\RequestContext;
 
 /**

+ 2 - 2
tests/Symfony/Tests/Component/Routing/Matcher/UrlMatcherTest.php

@@ -11,8 +11,8 @@
 
 namespace Symfony\Tests\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\Matcher\UrlMatcher;
 use Symfony\Component\Routing\Route;
 use Symfony\Component\Routing\RouteCollection;