Skip to content

Commit

Permalink
[Console] deprecated TableHelper in favor of Table
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Mar 3, 2014
1 parent 554b28d commit 39c495f
Show file tree
Hide file tree
Showing 6 changed files with 1,034 additions and 276 deletions.
36 changes: 36 additions & 0 deletions UPGRADE-3.0.md
Expand Up @@ -48,6 +48,42 @@ UPGRADE FROM 2.x to 3.0
}
```

* `TableHelper` has been removed in favor of `Table`.

Before:

```
$table = $app->getHelperSet()->get('table');
$table
->setHeaders(array('ISBN', 'Title', 'Author'))
->setRows(array(
array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'),
array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'),
array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'),
array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'),
))
;
$table->render($output);
```

After:

```
use Symfony\Component\Console\Helper\Table;
$table = new Table($output);
$table
->setHeaders(array('ISBN', 'Title', 'Author'))
->setRows(array(
array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'),
array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'),
array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'),
array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'),
))
;
$table->render();
```

### EventDispatcher

* The interface `Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface`
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/Console/CHANGELOG.md
Expand Up @@ -4,6 +4,7 @@ CHANGELOG
2.5.0
-----

* deprecated TableHelper in favor of Table
* deprecated ProgressHelper in favor of ProgressBar
* added a way to set a default command instead of `ListCommand`
* added a way to set the process name of a command
Expand Down

0 comments on commit 39c495f

Please sign in to comment.