10000 minor #14606 [DX][Routing] Display file which contain deprecated opti… · phansys/symfony@7ec5b4f · GitHub
[go: up one dir, main page]

Skip to content

Commit 7ec5b4f

Browse files
committed
minor symfony#14606 [DX][Routing] Display file which contain deprecated option (Koc)
This PR was merged into the 2.7 branch. Discussion ---------- [DX][Routing] Display file which contain deprecated option | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | waiting | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- 7784b29 [Routing] Display file which contain deprecated option
2 parents bdcce21 + 7784b29 commit 7ec5b4f

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