Building a Simple Symfony-based Console Tool

mikevanwinkle

Symfony provides a very elegant and flexible Console Component that can be used to create all kinds of simple (or complex) command-line tools. I will cover the basic concepts and demonstrate how to create a simple tool to check a github pull request’s status and send an email. This demo will engage the following Symfony libraries:

Symfony\Component\HttpFoundation\Request
Symfony\Component\Console\Command\Command
Symfony\Component\Console\Input\InputInterface
Symfony\Component\Console\Output\OutputInterface
Symfony\Component\Console\Input\InputArgument
Symfony\Component\Console\Input\InputOption
Symfony\Component\Console\Formatter\OutputFormatterStyle
Symfony\Component\Process\Process

Session Track

Symfony

Experience Level

Advanced

Drupal Version