Syfmony Console Table Titles

Introduction

Introduced in [Symfony 4.2](Symfony 4.2), you can now add table titles to console output.

Syntax

use Symfony\Component\Console\Helper\Table;
// …

output);
table->render();

Set max column width

// …

// the first argument is the column position (starting from 0) and
// the second argument is the max length in characters
table->setColumnMaxWidth(1, 10);
$table->render();