1
0
Fork 0

compatible with symfony/console 5.0.0 getVerticalBorderChars() method

pull/8754/head
Bingqing Wang 2020-04-09 13:03:42 +08:00 committed by Jordi Boggiano
parent ff3f055439
commit 63eb178297
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
4 changed files with 20 additions and 4 deletions

View File

@ -184,7 +184,11 @@ class BaseDependencyCommand extends BaseCommand
$renderer = new Table($output);
$renderer->setStyle('compact');
$rendererStyle = $renderer->getStyle();
$rendererStyle->setVerticalBorderChar('');
if (method_exists($rendererStyle, 'setVerticalBorderChars')) {
$rendererStyle->setVerticalBorderChars('');
} else {
$rendererStyle->setVerticalBorderChar('');
}
$rendererStyle->setCellRowContentFormat('%s ');
$renderer->setRows($table)->render();
}

View File

@ -155,7 +155,11 @@ EOT
$renderer = new Table($output);
$renderer->setStyle('compact');
$rendererStyle = $renderer->getStyle();
$rendererStyle->setVerticalBorderChar('');
if (method_exists($rendererStyle, 'setVerticalBorderChars')) {
$rendererStyle->setVerticalBorderChars('');
} else {
$rendererStyle->setVerticalBorderChar('');
}
$rendererStyle->setCellRowContentFormat('%s ');
$renderer->setRows($table)->render();
}

View File

@ -77,7 +77,11 @@ EOT
$table = new Table($output);
$table->setStyle('compact');
$tableStyle = $table->getStyle();
$tableStyle->setVerticalBorderChar('');
if (method_exists($rendererStyle, 'setVerticalBorderChars')) {
$rendererStyle->setVerticalBorderChars('');
} else {
$rendererStyle->setVerticalBorderChar('');
}
$tableStyle->setCellRowContentFormat('%s ');
$table->setHeaders(array('Name', 'Version', 'License'));
foreach ($packages as $package) {

View File

@ -133,7 +133,11 @@ EOT
$renderer = new Table($output);
$renderer->setStyle('compact');
$rendererStyle = $renderer->getStyle();
$rendererStyle->setVerticalBorderChar('');
if (method_exists($rendererStyle, 'setVerticalBorderChars')) {
$rendererStyle->setVerticalBorderChars('');
} else {
$rendererStyle->setVerticalBorderChar('');
}
$rendererStyle->setCellRowContentFormat('%s ');
$renderer->setRows($table)->render();