Bläddra i källkod

[Routing] removed an optimization as it does not always work as expected

Fabien Potencier 14 år sedan
förälder
incheckning
c536797cc9

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

@@ -125,7 +125,6 @@ EOF;
                 }
 
                 if ($optimizable && $prefix !== $parentPrefix) {
-                    $code[] = "            throw 0 < count(\$allow) ? new MethodNotAllowedException(array_unique(\$allow)) : new ResourceNotFoundException();";
                     $code[] = "        }\n";
                 }
             } else {

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

@@ -125,7 +125,6 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
                     return $matches;
                 }
         
-                throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
             }
     
             // ababa
@@ -139,7 +138,6 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
                 return $matches;
             }
     
-            throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
         }
 
         // foo

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

@@ -137,7 +137,6 @@ class ProjectUrlMatcher extends Symfony\Tests\Component\Routing\Fixtures\Redirec
                     return $matches;
                 }
         
-                throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
             }
     
             // ababa
@@ -151,7 +150,6 @@ class ProjectUrlMatcher extends Symfony\Tests\Component\Routing\Fixtures\Redirec
                 return $matches;
             }
     
-            throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
         }
 
         // foo