Skip to content

Commit e6811a3

Browse files
committed
fixed some deprecation messages
1 parent 588a8b7 commit e6811a3

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

Annotation/Route.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,15 @@ public function setRequirements($requirements)
109109
$this->methods = explode('|', $requirements['_method']);
110110
}
111111

112-
@trigger_error('The "_method" requirement is deprecated since version 2.2 and will be removed in 3.0. Use the "methods" option instead.', E_USER_DEPRECATED);
112+
@trigger_error('The "_method" requirement is deprecated since Symfony 2.2 and will be removed in 3.0. Use the "methods" option instead.', E_USER_DEPRECATED);
113113
}
114114

115115
if (isset($requirements['_scheme'])) {
116116
if (0 === count($this->schemes)) {
117117
$this->schemes = explode('|', $requirements['_scheme']);
118118
}
119119

120-
@trigger_error('The "_scheme" requirement is deprecated since version 2.2 and will be removed in 3.0. Use the "schemes" option instead.', E_USER_DEPRECATED);
120+
@trigger_error('The "_scheme" requirement is deprecated since Symfony 2.2 and will be removed in 3.0. Use the "schemes" option instead.', E_USER_DEPRECATED);
121121
}
122122

123123
$this->requirements = $requirements;

Loader/XmlFileLoader.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ protected function parseRoute(RouteCollection $collection, \DOMElement $node, $p
116116
throw new \InvalidArgumentException(sprintf('The <route> element in file "%s" cannot define both a "path" and a "pattern" attribute. Use only "path".', $path));
117117
}
118118

119-
@trigger_error(sprintf('The "pattern" option in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "path" option in the route definition instead.', $path), E_USER_DEPRECATED);
119+
@trigger_error(sprintf('The "pattern" option in file "%s" is deprecated since Symfony 2.2 and will be removed in 3.0. Use the "path" option in the route definition instead.', $path), E_USER_DEPRECATED);
120120

121121
$node->setAttribute('path', $node->getAttribute('pattern'));
122122
$node->removeAttribute('pattern');
@@ -133,7 +133,7 @@ protected function parseRoute(RouteCollection $collection, \DOMElement $node, $p
133133
}
134134

135135
unset($requirements['_method']);
136-
@trigger_error(sprintf('The "_method" requirement of route "%s" in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "methods" attribute instead.', $id, $path), E_USER_DEPRECATED);
136+
@trigger_error(sprintf('The "_method" requirement of route "%s" in file "%s" is deprecated since Symfony 2.2 and will be removed in 3.0. Use the "methods" attribute instead.', $id, $path), E_USER_DEPRECATED);
137137
}
138138

139139
if (isset($requirements['_scheme'])) {
@@ -142,7 +142,7 @@ protected function parseRoute(RouteCollection $collection, \DOMElement $node, $p
142142
}
143143

144144
unset($requirements['_scheme']);
145-
@trigger_error(sprintf('The "_scheme" requirement of route "%s" in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "schemes" attribute instead.', $id, $path), E_USER_DEPRECATED);
145+
@trigger_error(sprintf('The "_scheme" requirement of route "%s" in file "%s" is deprecated since Symfony 2.2 and will be removed in 3.0. Use the "schemes" attribute instead.', $id, $path), E_USER_DEPRECATED);
146146
}
147147

148148
$route = new Route($node->getAttribute('path'), $defaults, $requirements, $options, $node->getAttribute('host'), $schemes, $methods, $condition);

Loader/YamlFileLoader.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function load($file, $type = null)
8282
throw new \InvalidArgumentException(sprintf('The file "%s" cannot define both a "path" and a "pattern" attribute. Use only "path".', $path));
8383
}
8484

85-
@trigger_error(sprintf('The "pattern" option in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "path" option in the route definition instead.', $path), E_USER_DEPRECATED);
85+
@trigger_error(sprintf('The "pattern" option in file "%s" is deprecated since Symfony 2.2 and will be removed in 3.0. Use the "path" option in the route definition instead.', $path), E_USER_DEPRECATED);
8686

8787
$config['path'] = $config['pattern'];
8888
unset($config['pattern']);
@@ -132,7 +132,7 @@ protected function parseRoute(RouteCollection $collection, $name, array $config,
132132
}
133133

134134
unset($requirements['_method']);
135-
@trigger_error(sprintf('The "_method" requirement of route "%s" in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "methods" option instead.', $name, $path), E_USER_DEPRECATED);
135+
@trigger_error(sprintf('The "_method" requirement of route "%s" in file "%s" is deprecated since Symfony 2.2 and will be removed in 3.0. Use the "methods" option instead.', $name, $path), E_USER_DEPRECATED);
136136
}
137137

138138
if (isset($requirements['_scheme'])) {
@@ -141,7 +141,7 @@ protected function parseRoute(RouteCollection $collection, $name, array $config,
141141
}
142142

143143
unset($requirements['_scheme']);
144-
@trigger_error(sprintf('The "_scheme" requirement of route "%s" in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "schemes" option instead.', $name, $path), E_USER_DEPRECATED);
144+
@trigger_error(sprintf('The "_scheme" requirement of route "%s" in file "%s" is deprecated since Symfony 2.2 and will be removed in 3.0. Use the "schemes" option instead.', $name, $path), E_USER_DEPRECATED);
145145
}
146146

147147
$route = new Route($config['path'], $defaults, $requirements, $options, $host, $schemes, $methods, $condition);

Matcher/ApacheUrlMatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\Routing\Matcher;
1313

14-
@trigger_error('The '.__NAMESPACE__.'\ApacheUrlMatcher class is deprecated since version 2.5 and will be removed in 3.0. It\'s hard to replicate the behaviour of the PHP implementation and the performance gains are minimal.', E_USER_DEPRECATED);
14+
@trigger_error('The '.__NAMESPACE__.'\ApacheUrlMatcher class is deprecated since Symfony 2.5 and will be removed in 3.0. It\'s hard to replicate the behaviour of the PHP implementation and the performance gains are minimal.', E_USER_DEPRECATED);
1515

1616
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
1717

Matcher/Dumper/ApacheMatcherDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\Routing\Matcher\Dumper;
1313

14-
@trigger_error('The '.__NAMESPACE__.'\ApacheMatcherDumper class is deprecated since version 2.5 and will be removed in 3.0. It\'s hard to replicate the behaviour of the PHP implementation and the performance gains are minimal.', E_USER_DEPRECATED);
14+
@trigger_error('The '.__NAMESPACE__.'\ApacheMatcherDumper class is deprecated since Symfony 2.5 and will be removed in 3.0. It\'s hard to replicate the behaviour of the PHP implementation and the performance gains are minimal.', E_USER_DEPRECATED);
1515

1616
use Symfony\Component\Routing\Route;
1717

Route.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,9 +508,9 @@ public function addRequirements(array $requirements)
508508
public function getRequirement($key)
509509
{
510510
if ('_scheme' === $key) {
511-
@trigger_error('The "_scheme" requirement is deprecated since version 2.2 and will be removed in 3.0. Use getSchemes() instead.', E_USER_DEPRECATED);
511+
@trigger_error('The "_scheme" requirement is deprecated since Symfony 2.2 and will be removed in 3.0. Use getSchemes() instead.', E_USER_DEPRECATED);
512512
} elseif ('_method' === $key) {
513-
@trigger_error('The "_method" requirement is deprecated since version 2.2 and will be removed in 3.0. Use getMethods() instead.', E_USER_DEPRECATED);
513+
@trigger_error('The "_method" requirement is deprecated since Symfony 2.2 and will be removed in 3.0. Use getMethods() instead.', E_USER_DEPRECATED);
514514
}
515515

516516
return isset($this->requirements[$key]) ? $this->requirements[$key] : null;
@@ -612,11 +612,11 @@ private function sanitizeRequirement($key, $regex)
612612

613613
// this is to keep BC and will be removed in a future version
614614
if ('_scheme' === $key) {
615-
@trigger_error('The "_scheme" requirement is deprecated since version 2.2 and will be removed in 3.0. Use the setSchemes() method instead.', E_USER_DEPRECATED);
615+
@trigger_error('The "_scheme" requirement is deprecated since Symfony 2.2 and will be removed in 3.0. Use the setSchemes() method instead.', E_USER_DEPRECATED);
616616

617617
$this->setSchemes(explode('|', $regex));
618618
} elseif ('_method' === $key) {
619-
@trigger_error('The "_method" requirement is deprecated since version 2.2 and will be removed in 3.0. Use the setMethods() method instead.', E_USER_DEPRECATED);
619+
@trigger_error('The "_method" requirement is deprecated since Symfony 2.2 and will be removed in 3.0. Use the setMethods() method instead.', E_USER_DEPRECATED);
620620

621621
$this->setMethods(explode('|', $regex));
622622
}

0 commit comments

Comments
 (0)