deprecated the --xml option for commands

This commit is contained in:
Fabien Potencier 2015-05-16 15:23:52 +02:00
parent 0542a17b5b
commit c4bf217e66
2 changed files with 4 additions and 0 deletions

View File

@ -77,6 +77,8 @@ EOF
}
if ($input->getOption('xml')) {
trigger_error('The --xml option was deprecated in version 2.7 and will be removed in version 3.0. Use the --format option instead.', E_USER_DEPRECATED);
$input->setOption('format', 'xml');
}

View File

@ -69,6 +69,8 @@ EOF
protected function execute(InputInterface $input, OutputInterface $output)
{
if ($input->getOption('xml')) {
trigger_error('The --xml option was deprecated in version 2.7 and will be removed in version 3.0. Use the --format option instead.', E_USER_DEPRECATED);
$input->setOption('format', 'xml');
}