From 063ca2d70846307867e3efd2373c4b371212f146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Fri, 9 Feb 2018 11:36:26 +0100 Subject: [PATCH] Fix broken table generation In 2c9922e8afc8f4b2d6d93b63dbfb865b139eac48 the code was optimised but the order of method calls was incorrect, leading to several errors in the test suite. Not all the tests related to table generation got fixed, but at least the component is not broken anymore. Fixes https://github.com/symfony/symfony/issues/26081 --- src/Symfony/Component/Console/Helper/Table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Console/Helper/Table.php b/src/Symfony/Component/Console/Helper/Table.php index 70ef04c0eb..d54f63684a 100644 --- a/src/Symfony/Component/Console/Helper/Table.php +++ b/src/Symfony/Component/Console/Helper/Table.php @@ -565,7 +565,7 @@ class Table /** * Calculates columns widths. */ - private function calculateColumnsWidth(array $rows) + private function calculateColumnsWidth(iterable $rows) { for ($column = 0; $column < $this->numberOfColumns; ++$column) { $lengths = array();