A port of Symfony2 Console Component