Closed
Description
Q | A |
---|---|
Bug report? | no |
Feature request? | yes |
Symfony version | master |
Given
dump('benchmark');
$output->writeln(str_repeat('-', getenv('COLUMNS')));
dump('table short; min width');
$table = new Table($output);
$table->setRows(array(
array(implode(', ', range('A', 'Z'))),
));
$table->setColumnWidths(array(getenv('COLUMNS')));
$table->render();
dump('table long; default width');
$table = new Table($output);
$table->setRows(array(
array(implode(', ', range('1', '100'))),
));
$table->render();
It renders
For the min-width example i expected a perfectly fitting table :)
The default-width example works as documented, and setColumnWidth
wont help, because that's actually setMinColumnWidth
(also documented i believe :))
Imo. we're missing a setMaxColumnWidth
or something to control text wrapping. Im not sure we should ever exceed the max. (terminal) width unless we cant wrap any further of course.
Any thoughts?