Commit 42c845a0 authored by alexpott's avatar alexpott

Issue #2498515 by Berdir, neclimdul: Update additional Symfony Components to 2.7.0

parent b105158a
......@@ -50,3 +50,4 @@
*.jpg -text diff
*.png -text diff
*.phar -text diff
*.exe -text diff
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "61a2b6dec8252d78e904d37fbf1637d7",
......@@ -2143,21 +2143,20 @@
},
{
"name": "symfony/browser-kit",
"version": "v2.6.9",
"target-dir": "Symfony/Component/BrowserKit",
"version": "v2.7.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/BrowserKit.git",
"reference": "cf950c42947ea2f29c36a1f443202b6134f5c303"
"reference": "70cdc18dd601a486a8cc69ee26367cbaedd60400"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/BrowserKit/zipball/cf950c42947ea2f29c36a1f443202b6134f5c303",
"reference": "cf950c42947ea2f29c36a1f443202b6134f5c303",
"url": "https://api.github.com/repos/symfony/BrowserKit/zipball/70cdc18dd601a486a8cc69ee26367cbaedd60400",
"reference": "70cdc18dd601a486a8cc69ee26367cbaedd60400",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"php": ">=5.3.9",
"symfony/dom-crawler": "~2.0,>=2.0.5"
},
"require-dev": {
......@@ -2171,11 +2170,11 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.6-dev"
"dev-master": "2.7-dev"
}
},
"autoload": {
"psr-0": {
"psr-4": {
"Symfony\\Component\\BrowserKit\\": ""
}
},
......@@ -2195,7 +2194,7 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
"time": "2015-05-02 15:18:45"
"time": "2015-05-02 15:21:08"
},
{
"name": "symfony/class-loader",
......@@ -2249,16 +2248,16 @@
},
{
"name": "symfony/console",
"version": "v2.7.0-BETA2",
"version": "v2.7.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/Console.git",
"reference": "555ba7fc54a538e1b83988e2299db09b6b6dca64"
"reference": "7f0bec04961c61c961df0cb8c2ae88dbfd83f399"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Console/zipball/555ba7fc54a538e1b83988e2299db09b6b6dca64",
"reference": "555ba7fc54a538e1b83988e2299db09b6b6dca64",
"url": "https://api.github.com/repos/symfony/Console/zipball/7f0bec04961c61c961df0cb8c2ae88dbfd83f399",
"reference": "7f0bec04961c61c961df0cb8c2ae88dbfd83f399",
"shasum": ""
},
"require": {
......@@ -2302,7 +2301,7 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"time": "2015-05-02 15:21:08"
"time": "2015-05-29 16:22:24"
},
{
"name": "symfony/css-selector",
......@@ -2359,21 +2358,20 @@
},
{
"name": "symfony/debug",
"version": "v2.6.9",
"target-dir": "Symfony/Component/Debug",
"version": "v2.7.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/Debug.git",
"reference": "4851a041c48e76b91a221db84ab5850daa6a7b33"
"reference": "1df2971b27a6ff73dae4ea622f42802000ec332d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Debug/zipball/4851a041c48e76b91a221db84ab5850daa6a7b33",
"reference": "4851a041c48e76b91a221db84ab5850daa6a7b33",
"url": "https://api.github.com/repos/symfony/Debug/zipball/1df2971b27a6ff73dae4ea622f42802000ec332d",
"reference": "1df2971b27a6ff73dae4ea622f42802000ec332d",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"php": ">=5.3.9",
"psr/log": "~1.0"
},
"conflict": {
......@@ -2392,11 +2390,11 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.6-dev"
"dev-master": "2.7-dev"
}
},
"autoload": {
"psr-0": {
"psr-4": {
"Symfony\\Component\\Debug\\": ""
}
},
......@@ -2416,7 +2414,7 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
"time": "2015-05-20 13:09:45"
"time": "2015-05-22 14:54:25"
},
{
"name": "symfony/dependency-injection",
......@@ -2480,21 +2478,20 @@
},
{
"name": "symfony/dom-crawler",
"version": "v2.6.9",
"target-dir": "Symfony/Component/DomCrawler",
"version": "v2.7.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/DomCrawler.git",
"reference": "c74fe625d8c65fee512de2b40cceabba1b09503b"
"reference": "11d8eb8ccc1533f4c2d89a025f674894fda520b3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/DomCrawler/zipball/c74fe625d8c65fee512de2b40cceabba1b09503b",
"reference": "c74fe625d8c65fee512de2b40cceabba1b09503b",
"url": "https://api.github.com/repos/symfony/DomCrawler/zipball/11d8eb8ccc1533f4c2d89a025f674894fda520b3",
"reference": "11d8eb8ccc1533f4c2d89a025f674894fda520b3",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
"php": ">=5.3.9"
},
"require-dev": {
"symfony/css-selector": "~2.3",
......@@ -2506,11 +2503,11 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.6-dev"
"dev-master": "2.7-dev"
}
},
"autoload": {
"psr-0": {
"psr-4": {
"Symfony\\Component\\DomCrawler\\": ""
}
},
......@@ -2530,7 +2527,7 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
"time": "2015-05-22 14:53:08"
"time": "2015-05-22 14:54:25"
},
{
"name": "symfony/event-dispatcher",
......
......@@ -9,9 +9,6 @@
'phpDocumentor' => array($vendorDir . '/phpdocumentor/reflection-docblock/src'),
'org\\bovigo\\vfs\\' => array($vendorDir . '/mikey179/vfsStream/src/main/php'),
'Twig_' => array($vendorDir . '/twig/twig/lib'),
'Symfony\\Component\\DomCrawler\\' => array($vendorDir . '/symfony/dom-crawler'),
'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'),
'Symfony\\Component\\BrowserKit\\' => array($vendorDir . '/symfony/browser-kit'),
'Stack' => array($vendorDir . '/stack/builder/src'),
'Psr\\Log\\' => array($vendorDir . '/psr/log'),
'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src'),
......
......@@ -18,10 +18,13 @@
'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'),
'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'),
'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'),
'Symfony\\Component\\DomCrawler\\' => array($vendorDir . '/symfony/dom-crawler'),
'Symfony\\Component\\DependencyInjection\\' => array($vendorDir . '/symfony/dependency-injection'),
'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'),
'Symfony\\Component\\CssSelector\\' => array($vendorDir . '/symfony/css-selector'),
'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
'Symfony\\Component\\ClassLoader\\' => array($vendorDir . '/symfony/class-loader'),
'Symfony\\Component\\BrowserKit\\' => array($vendorDir . '/symfony/browser-kit'),
'Symfony\\Cmf\\Component\\Routing\\' => array($vendorDir . '/symfony-cmf/routing'),
'React\\Promise\\' => array($vendorDir . '/react/promise/src'),
'Masterminds\\' => array($vendorDir . '/masterminds/html5/src'),
......
This diff is collapsed.
......@@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.3.3",
"php": ">=5.3.9",
"symfony/dom-crawler": "~2.0,>=2.0.5"
},
"require-dev": {
......@@ -28,13 +28,12 @@
"symfony/process": ""
},
"autoload": {
"psr-0": { "Symfony\\Component\\BrowserKit\\": "" }
"psr-4": { "Symfony\\Component\\BrowserKit\\": "" }
},
"target-dir": "Symfony/Component/BrowserKit",
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "2.6-dev"
"dev-master": "2.7-dev"
}
}
}
......@@ -9,6 +9,7 @@
<php>
<ini name="error_reporting" value="-1" />
</php>
<testsuites>
<testsuite name="Symfony BrowserKit Component Test Suite">
<directory>./Tests/</directory>
......
......@@ -717,7 +717,7 @@ public function renderException($e, $output)
'args' => array(),
));
for ($i = 0, $count = count($trace); $i < $count; $i++) {
for ($i = 0, $count = count($trace); $i < $count; ++$i) {
$class = isset($trace[$i]['class']) ? $trace[$i]['class'] : '';
$type = isset($trace[$i]['type']) ? $trace[$i]['type'] : '';
$function = $trace[$i]['function'];
......@@ -925,12 +925,12 @@ protected function getDefaultInputDefinition()
return new InputDefinition(array(
new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'),
new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'),
new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'),
new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug'),
new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'),
new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'),
new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'),
new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'),
new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'),
new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug'),
new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'),
new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'),
new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'),
new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'),
));
}
......
......@@ -38,7 +38,7 @@ protected function configure()
->setDefinition(array(
new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'),
new InputOption('xml', null, InputOption::VALUE_NONE, 'To output help as XML'),
new InputOption('format', null, InputOption::VALUE_REQUIRED, 'To output help in other formats', 'txt'),
new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'),
new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'),
))
->setDescription('Displays help for a command')
......@@ -77,6 +77,8 @@ 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');
}
......
......@@ -69,6 +69,8 @@ public function getNativeDefinition()
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');
}
......@@ -89,7 +91,7 @@ private function createDefinition()
new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'),
new InputOption('xml', null, InputOption::VALUE_NONE, 'To output list as XML'),
new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command list'),
new InputOption('format', null, InputOption::VALUE_REQUIRED, 'To output list in other formats', 'txt'),
new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'),
));
}
}
......@@ -142,6 +142,7 @@ public function getStyle($name)
*/
public function format($message)
{
$message = (string) $message;
$offset = 0;
$output = '';
$tagRegex = '[a-z][a-z0-9_=;-]*';
......
......@@ -145,7 +145,7 @@ public function ask(OutputInterface $output, $question, $default = null, array $
// Backspace Character
if ("\177" === $c) {
if (0 === $numMatches && 0 !== $i) {
$i--;
--$i;
// Move cursor backwards
$output->write("\033[1D");
}
......@@ -198,7 +198,7 @@ public function ask(OutputInterface $output, $question, $default = null, array $
} else {
$output->write($c);
$ret .= $c;
$i++;
++$i;
$numMatches = 0;
$ofs = 0;
......
......@@ -123,7 +123,7 @@ private function parseShortOption($token)
private function parseShortOptionSet($name)
{
$len = strlen($name);
for ($i = 0; $i < $len; $i++) {
for ($i = 0; $i < $len; ++$i) {
if (!$this->definition->hasShortcut($name[$i])) {
throw new \RuntimeException(sprintf('The "-%s" option does not exist.', $name[$i]));
}
......
......@@ -391,7 +391,7 @@ private function shortcutToName($shortcut)
/**
* Gets the synopsis.
*
* @param bool $short Whether to return the short version (with options foloded) or not
* @param bool $short Whether to return the short version (with options folded) or not
*
* @return string The synopsis
*/
......
......@@ -94,7 +94,7 @@ protected function doWrite($message, $newline)
*/
protected function hasColorSupport()
{
if (DIRECTORY_SEPARATOR == '\\') {
if (DIRECTORY_SEPARATOR === '\\') {
return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI');
}
......
......@@ -149,19 +149,19 @@ private function getDefaultValidator()
$result = array_search($value, $choices);
if (!$isAssoc) {
if (!empty($result)) {
if (false !== $result) {
$result = $choices[$result];
} elseif (isset($choices[$value])) {
$result = $choices[$value];
}
} elseif (empty($result) && array_key_exists($value, $choices)) {
} elseif (false === $result && isset($choices[$value])) {
$result = $value;
}
if (empty($result)) {
if (false === $result) {
throw new \InvalidArgumentException(sprintf($errorMessage, $value));
}
array_push($multiselectChoices, $result);
array_push($multiselectChoices, (string) $result);
}
if ($multiselect) {
......
......@@ -12,7 +12,7 @@
namespace Symfony\Component\Console\Style;
/**
* Output style helpers
* Output style helpers.
*
* @author Kevin Bond <kevinbond@gmail.com>
*/
......@@ -92,9 +92,9 @@ public function table(array $headers, array $rows);
/**
* Asks a question.
*
* @param string $question
* @param string|null $default
* @param callable|null $validator
* @param string $question
* @param string|null $default
* @param callable|null $validator
*
* @return string
*/
......@@ -132,7 +132,7 @@ public function confirm($question, $default = true);
public function choice($question, array $choices, $default = null);
/**
* Add newline(s)
* Add newline(s).
*
* @param int $count The number of newlines
*/
......
......@@ -52,15 +52,15 @@ public function __construct(InputInterface $input, OutputInterface $output)
/**
* Formats a message as a block of text.
*
* @param string|array $messages The message to write in the block
* @param string|null $type The block type (added in [] on first line)
* @param string|null $style The style to apply to the whole block
* @param string $prefix The prefix for the block
* @param bool $padding Whether to add vertical padding
* @param string|array $messages The message to write in the block
* @param string|null $type The block type (added in [] on first line)
* @param string|null $style The style to apply to the whole block
* @param string $prefix The prefix for the block
* @param bool $padding Whether to add vertical padding
*/
public function block($messages, $type = null, $style = null, $prefix = ' ', $padding = false)
{
$messages = array_values((array) $messages);
$messages = is_array($messages) ? array_values($messages) : array($messages);
$lines = array();
// add type
......@@ -85,7 +85,7 @@ public function block($messages, $type = null, $style = null, $prefix = ' ', $pa
foreach ($lines as &$line) {
$line = sprintf('%s%s', $prefix, $line);
$line .= str_repeat(' ', $this->lineLength - Helper::strlen($line));
$line .= str_repeat(' ', $this->lineLength - Helper::strlenWithoutDecoration($this->getFormatter(), $line));
if ($style) {
$line = sprintf('<%s>%s</>', $style, $line);
......
......@@ -167,15 +167,6 @@ public function testGetHelper()
$this->assertEquals($formatterHelper->getName(), $command->getHelper('formatter')->getName(), '->getHelper() returns the correct helper');
}
public function testGet()
{
$application = new Application();
$command = new \TestCommand();
$command->setApplication($application);
$formatterHelper = new FormatterHelper();
$this->assertEquals($formatterHelper->getName(), $command->getHelper('formatter')->getName(), '->__get() returns the correct helper');
}
public function testMergeApplicationDefinition()
{
$application1 = new Application();
......
{"commands":[{"name":"help","usage":["help [--xml] [--format FORMAT] [--raw] [--] [<command_name>]"],"description":"Displays help for a command","help":"The <info>help<\/info> command displays help for a given command:\n\n <info>php app\/console help list<\/info>\n\nYou can also output the help in other formats by using the <comment>--format<\/comment> option:\n\n <info>php app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the <info>list<\/info> command.","definition":{"arguments":{"command_name":{"name":"command_name","is_required":false,"is_array":false,"description":"The command name","default":"help"}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output help as XML","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"To output help in other formats","default":"txt"},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command help","default":false},"help":{"name":"--help","shortcut":"-h","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this help message","default":false},"quiet":{"name":"--quiet","shortcut":"-q","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not output any message","default":false},"verbose":{"name":"--verbose","shortcut":"-v|-vv|-vvv","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug","default":false},"version":{"name":"--version","shortcut":"-V","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this application version","default":false},"ansi":{"name":"--ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Force ANSI output","default":false},"no-ansi":{"name":"--no-ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Disable ANSI output","default":false},"no-interaction":{"name":"--no-interaction","shortcut":"-n","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not ask any interactive question","default":false}}}},{"name":"list","usage":["list [--xml] [--raw] [--format FORMAT] [--] [<namespace>]"],"description":"Lists commands","help":"The <info>list<\/info> command lists all commands:\n\n <info>php app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n <info>php app\/console list test<\/info>\n\nYou can also output the information in other formats by using the <comment>--format<\/comment> option:\n\n <info>php app\/console list --format=xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n <info>php app\/console list --raw<\/info>","definition":{"arguments":{"namespace":{"name":"namespace","is_required":false,"is_array":false,"description":"The namespace name","default":null}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output list as XML","default":false},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command list","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"To output list in other formats","default":"txt"}}}}],"namespaces":[{"id":"_global","commands":["help","list"]}]}
{"commands":[{"name":"help","usage":["help [--xml] [--format FORMAT] [--raw] [--] [<command_name>]"],"description":"Displays help for a command","help":"The <info>help<\/info> command displays help for a given command:\n\n <info>php app\/console help list<\/info>\n\nYou can also output the help in other formats by using the <comment>--format<\/comment> option:\n\n <info>php app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the <info>list<\/info> command.","definition":{"arguments":{"command_name":{"name":"command_name","is_required":false,"is_array":false,"description":"The command name","default":"help"}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output help as XML","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"The output format (txt, xml, json, or md)","default":"txt"},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command help","default":false},"help":{"name":"--help","shortcut":"-h","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this help message","default":false},"quiet":{"name":"--quiet","shortcut":"-q","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not output any message","default":false},"verbose":{"name":"--verbose","shortcut":"-v|-vv|-vvv","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug","default":false},"version":{"name":"--version","shortcut":"-V","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this application version","default":false},"ansi":{"name":"--ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Force ANSI output","default":false},"no-ansi":{"name":"--no-ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Disable ANSI output","default":false},"no-interaction":{"name":"--no-interaction","shortcut":"-n","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not ask any interactive question","default":false}}}},{"name":"list","usage":["list [--xml] [--raw] [--format FORMAT] [--] [<namespace>]"],"description":"Lists commands","help":"The <info>list<\/info> command lists all commands:\n\n <info>php app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n <info>php app\/console list test<\/info>\n\nYou can also output the information in other formats by using the <comment>--format<\/comment> option:\n\n <info>php app\/console list --format=xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n <info>php app\/console list --raw<\/info>","definition":{"arguments":{"namespace":{"name":"namespace","is_required":false,"is_array":false,"description":"The namespace name","default":null}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output list as XML","default":false},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command list","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"The output format (txt, xml, json, or md)","default":"txt"}}}}],"namespaces":[{"id":"_global","commands":["help","list"]}]}
......@@ -51,7 +51,7 @@ To display the list of available commands, please use the <info>list</info> comm
* Accept value: yes
* Is value required: yes
* Is multiple: no
* Description: To output help in other formats
* Description: The output format (txt, xml, json, or md)
* Default: `'txt'`
**raw:**
......@@ -197,5 +197,5 @@ It's also possible to get raw list of commands (useful for embedding command run
* Accept value: yes
* Is value required: yes
* Is multiple: no
* Description: To output list in other formats
* Description: The output format (txt, xml, json, or md)
* Default: `'txt'`
......@@ -28,7 +28,7 @@
<description>To output help as XML</description>
</option>
<option name="--format" shortcut="" accept_value="1" is_value_required="1" is_multiple="0">
<description>To output help in other formats</description>
<description>The output format (txt, xml, json, or md)</description>
<defaults>
<default>txt</default>
</defaults>
......@@ -93,7 +93,7 @@
<description>To output raw command list</description>
</option>
<option name="--format" shortcut="" accept_value="1" is_value_required="1" is_multiple="0">
<description>To output list in other formats</description>
<description>The output format (txt, xml, json, or md)</description>
<defaults>
<default>txt</default>
</defaults>
......
......@@ -58,7 +58,7 @@ To display the list of available commands, please use the <info>list</info> comm
* Accept value: yes
* Is value required: yes
* Is multiple: no
* Description: To output help in other formats
* Description: The output format (txt, xml, json, or md)
* Default: `'txt'`
**raw:**
......@@ -204,7 +204,7 @@ It's also possible to get raw list of commands (useful for embedding command run
* Accept value: yes
* Is value required: yes
* Is multiple: no
* Description: To output list in other formats
* Description: The output format (txt, xml, json, or md)
* Default: `'txt'`
descriptor:command1
......
......@@ -28,7 +28,7 @@
<description>To output help as XML</description>
</option>
<option name="--format" shortcut="" accept_value="1" is_value_required="1" is_multiple="0">
<description>To output help in other formats</description>
<description>The output format (txt, xml, json, or md)</description>
<defaults>
<default>txt</default>
</defaults>
......@@ -93,7 +93,7 @@
<description>To output raw command list</description>
</option>
<option name="--format" shortcut="" accept_value="1" is_value_required="1" is_multiple="0">
<description>To output list in other formats</description>
<description>The output format (txt, xml, json, or md)</description>
<defaults>
<default>txt</default>
</defaults>
......
......@@ -28,7 +28,7 @@
<description>To output help as XML</description>
</option>
<option name="--format" shortcut="" accept_value="1" is_value_required="1" is_multiple="0">
<description>To output help in other formats</description>
<description>The output format (txt, xml, json, or md)</description>
<defaults>
<default>txt</default>
</defaults>
......@@ -93,7 +93,7 @@
<description>To output raw command list</description>
</option>
<option name="--format" shortcut="" accept_value="1" is_value_required="1" is_multiple="0">
<description>To output list in other formats</description>
<description>The output format (txt, xml, json, or md)</description>
<defaults>
<default>txt</default>
</defaults>
......
......@@ -7,7 +7,7 @@ Arguments:
Options:
--xml To output help as XML
--format=FORMAT To output help in other formats [default: "txt"]
--format=FORMAT The output format (txt, xml, json, or md) [default: "txt"]
--raw To output raw command help
-h, --help Display this help message
-q, --quiet Do not output any message
......
......@@ -7,7 +7,7 @@ Arguments:
Options:
--xml To output list as XML
--raw To output raw command list
--format=FORMAT To output list in other formats [default: "txt"]
--format=FORMAT The output format (txt, xml, json, or md) [default: "txt"]
Help:
The list command lists all commands:
......
......@@ -166,6 +166,14 @@ public function testFormatLongString()
$this->assertEquals("\033[37;41msome error\033[39;49m".$long, $formatter->format('<error>some error</error>'.$long));
}
public function testFormatToStringObject()
{
$formatter = new OutputFormatter(false);
$this->assertEquals(
'some info', $formatter->format(new TableCell())
);
}
public function testNotDecoratedFormatter()
{
$formatter = new OutputFormatter(false);
......@@ -255,3 +263,11 @@ public function testContentWithLineBreaks()
));