[Routing] Display file which contain deprecated option

This commit is contained in:
Konstantin.Myakshin 2015-05-11 16:21:22 +03:00
parent 002101094a
commit 7784b29e5a
2 changed files with 2 additions and 2 deletions

View File

@ -122,7 +122,7 @@ class XmlFileLoader extends FileLoader
throw new \InvalidArgumentException(sprintf('The <route> element in file "%s" cannot define both a "path" and a "pattern" attribute. Use only "path".', $path));
}
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);
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);
$node->setAttribute('path', $node->getAttribute('pattern'));
$node->removeAttribute('pattern');

View File

@ -81,7 +81,7 @@ class YamlFileLoader extends FileLoader
throw new \InvalidArgumentException(sprintf('The file "%s" cannot define both a "path" and a "pattern" attribute. Use only "path".', $path));
}
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);
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);
$config['path'] = $config['pattern'];
unset($config['pattern']);