Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | 2.7+ |
When using the TableCell helper in the Console Component, if I pass a numeric value as the first parameter of the constructor, then render the table, PHP throws an error:
Method Symfony\Component\Console\Helper\TableCell::__toString() must return a string value
Sample code:
$table = new Table($output);
$table->setRows([[new TableCell(12345)]]);
$table->render();
Casting to a string (either in the TableCell helper, or before the value is passed to the constructor) fixes it.