8000 [Routing] Display file which contain deprecated option · symfony/symfony@7784b29 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7784b29

Browse files
committed
[Routing] Display file which contain deprecated option
1 parent 0021010 commit 7784b29

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/Routing/Loader/XmlFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ protected function parseRoute(RouteCollection $collection, \DOMElement $node, $p
122122
throw new \InvalidArgumentException(sprintf('The <route> element in file "%s" cannot define both a "path" and a "pattern" attribute. Use only "path".', $path));
123123
}
124124

125-
trigger_error('The "pattern" is deprecated since version 2.2 and will be removed in 3.0. Use the "path" option in the route definition instead.', E_USER_DEPRECATED);
125+
trigger_error(sprintf('The "pattern" 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);
126126

127127
$node->setAttribute('path', $node->getAttribute('pattern'));
128128
$node->removeAttribute('pattern');

src/Symfony/Component/Routing/Loader/YamlFileLoader.php

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

84-
trigger_error('The "pattern" is deprecated since version 2.2 and will be removed in 3.0. Use the "path" option in the route definition instead.', E_USER_DEPRECATED);
84+
trigger_error(sprintf('The "pattern" 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);
8585

8686
$config['path'] = $config['pattern'];
8787
unset($config['pattern']);

0 commit comments

Comments
 (0)
0