diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php index ac48ca978f..0ff82a2c93 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php @@ -264,7 +264,6 @@ EOF; if ('/' === substr(\$pathinfo, -1)) { // no-op } elseif (!in_array(\$this->context->getMethod(), array('HEAD', 'GET'))) { - \$allow[] = 'GET'; goto $gotoname; } else { return \$this->redirect(\$rawPathinfo.'/', '$name'); @@ -283,7 +282,6 @@ EOF; \$requiredSchemes = $schemes; if (!isset(\$requiredSchemes[\$this->context->getScheme()])) { if (!in_array(\$this->context->getMethod(), array('HEAD', 'GET'))) { - \$allow[] = 'GET'; goto $gotoname; } diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php b/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php index 467d53b3ed..7c8e997477 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php @@ -69,7 +69,6 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec if ('/' === substr($pathinfo, -1)) { // no-op } elseif (!in_array($this->context->getMethod(), array('HEAD', 'GET'))) { - $allow[] = 'GET'; goto not_baz3; } else { return $this->redirect($rawPathinfo.'/', 'baz3'); @@ -86,7 +85,6 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec if ('/' === substr($pathinfo, -1)) { // no-op } elseif (!in_array($this->context->getMethod(), array('HEAD', 'GET'))) { - $allow[] = 'GET'; goto not_baz4; } else { return $this->redirect($rawPathinfo.'/', 'baz4'); @@ -185,7 +183,6 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec if ('/' === substr($pathinfo, -1)) { // no-op } elseif (!in_array($this->context->getMethod(), array('HEAD', 'GET'))) { - $allow[] = 'GET'; goto not_hey; } else { return $this->redirect($rawPathinfo.'/', 'hey'); @@ -337,7 +334,6 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec $requiredSchemes = array ( 'https' => 0,); if (!isset($requiredSchemes[$this->context->getScheme()])) { if (!in_array($this->context->getMethod(), array('HEAD', 'GET'))) { - $allow[] = 'GET'; goto not_secure; } @@ -353,7 +349,6 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec $requiredSchemes = array ( 'http' => 0,); if (!isset($requiredSchemes[$this->context->getScheme()])) { if (!in_array($this->context->getMethod(), array('HEAD', 'GET'))) { - $allow[] = 'GET'; goto not_nonsecure; } diff --git a/src/Symfony/Component/Routing/Tests/Matcher/DumpedRedirectableUrlMatcherTest.php b/src/Symfony/Component/Routing/Tests/Matcher/DumpedRedirectableUrlMatcherTest.php index 7ea8aa2834..28f65aeeb5 100644 --- a/src/Symfony/Component/Routing/Tests/Matcher/DumpedRedirectableUrlMatcherTest.php +++ b/src/Symfony/Component/Routing/Tests/Matcher/DumpedRedirectableUrlMatcherTest.php @@ -19,14 +19,6 @@ use Symfony\Component\Routing\RequestContext; class DumpedRedirectableUrlMatcherTest extends RedirectableUrlMatcherTest { - /** - * @expectedException \Symfony\Component\Routing\Exception\MethodNotAllowedException - */ - public function testRedirectWhenNoSlashForNonSafeMethod() - { - parent::testRedirectWhenNoSlashForNonSafeMethod(); - } - protected function getUrlMatcher(RouteCollection $routes, RequestContext $context = null) { static $i = 0;