diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php
index 8548b21137..014fa06228 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php
@@ -180,9 +180,6 @@ class JsonDescriptor extends Descriptor
*/
protected function getRouteData(Route $route)
{
- $requirements = $route->getRequirements();
- unset($requirements['_scheme'], $requirements['_method']);
-
return array(
'path' => $route->getPath(),
'pathRegex' => $route->compile()->getRegex(),
@@ -192,7 +189,7 @@ class JsonDescriptor extends Descriptor
'method' => $route->getMethods() ? implode('|', $route->getMethods()) : 'ANY',
'class' => get_class($route),
'defaults' => $route->getDefaults(),
- 'requirements' => $requirements ?: 'NO CUSTOM',
+ 'requirements' => $route->getRequirements() ?: 'NO CUSTOM',
'options' => $route->getOptions(),
);
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php
index a3ebd7f1e5..4921d2ba5b 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php
@@ -49,9 +49,6 @@ class MarkdownDescriptor extends Descriptor
*/
protected function describeRoute(Route $route, array $options = array())
{
- $requirements = $route->getRequirements();
- unset($requirements['_scheme'], $requirements['_method']);
-
$output = '- Path: '.$route->getPath()
."\n".'- Path Regex: '.$route->compile()->getRegex()
."\n".'- Host: '.('' !== $route->getHost() ? $route->getHost() : 'ANY')
@@ -60,7 +57,7 @@ class MarkdownDescriptor extends Descriptor
."\n".'- Method: '.($route->getMethods() ? implode('|', $route->getMethods()) : 'ANY')
."\n".'- Class: '.get_class($route)
."\n".'- Defaults: '.$this->formatRouterConfig($route->getDefaults())
- ."\n".'- Requirements: '.($requirements ? $this->formatRouterConfig($requirements) : 'NO CUSTOM')
+ ."\n".'- Requirements: '.($route->getRequirements() ? $this->formatRouterConfig($route->getRequirements()) : 'NO CUSTOM')
."\n".'- Options: '.$this->formatRouterConfig($route->getOptions());
$this->write(isset($options['name'])
diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
index 85dbb2b8b8..9dd9200f65 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
@@ -70,9 +70,6 @@ class TextDescriptor extends Descriptor
*/
protected function describeRoute(Route $route, array $options = array())
{
- $requirements = $route->getRequirements();
- unset($requirements['_scheme'], $requirements['_method']);
-
// fixme: values were originally written as raw
$description = array(
'Path '.$route->getPath(),
@@ -83,7 +80,7 @@ class TextDescriptor extends Descriptor
'Method '.($route->getMethods() ? implode('|', $route->getMethods()) : 'ANY'),
'Class '.get_class($route),
'Defaults '.$this->formatRouterConfig($route->getDefaults()),
- 'Requirements '.($requirements ? $this->formatRouterConfig($requirements) : 'NO CUSTOM'),
+ 'Requirements '.($route->getRequirements() ? $this->formatRouterConfig($route->getRequirements()) : 'NO CUSTOM'),
'Options '.$this->formatRouterConfig($route->getOptions()),
);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php
index c37a9009fc..fe0c357e11 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php
@@ -196,11 +196,9 @@ class XmlDescriptor extends Descriptor
}
}
- $requirements = $route->getRequirements();
- unset($requirements['_scheme'], $requirements['_method']);
- if (count($requirements)) {
+ if (count($route->getRequirements())) {
$routeXML->appendChild($requirementsXML = $dom->createElement('requirements'));
- foreach ($requirements as $attribute => $pattern) {
+ foreach ($route->getRequirements() as $attribute => $pattern) {
$requirementsXML->appendChild($requirementXML = $dom->createElement('requirement'));
$requirementXML->setAttribute('key', $attribute);
$requirementXML->appendChild(new \DOMText($pattern));
diff --git a/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php b/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php
index 46882cdc4f..b5bc751662 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php
@@ -92,10 +92,6 @@ class Router extends BaseRouter implements WarmableInterface
}
foreach ($route->getRequirements() as $name => $value) {
- if ('_scheme' === $name || '_method' === $name) {
- continue; // ignore deprecated requirements to not trigger deprecation warnings
- }
-
$route->setRequirement($name, $this->resolve($value));
}