Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[symfony/console] Tables using "box" style with colspan break layout #28532

Closed
@rhukster

Description

@rhukster

Symfony version(s) affected: 4.1.x

Description
When using the box or box-double Table styling, regular tables are rendered fine, but tables with nested TableCells using colspan break the layout.

How to reproduce

Using this code from the docs (plus a style):

$table = new Table($output);
$table->setStyle('box');
$table
    ->setHeaders(array('ISBN', 'Title', 'Author'))
    ->setRows(array(
        array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'),
        new TableSeparator(),
        array(new TableCell('This value spans 3 columns.', array('colspan' => 3))),
    ))
;
$table->render();

results in this:

monosnap-2018-09-20-20-02-10 image

compared to this with the default styling:

monosnap-2018-09-20-20-02-34 image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions