I prefer:
````php
$container
    ->register('foo.commands.my_command', 'Acme\HelloBundle\Command\MyCommand')
    ->addTag('console.command');
````