The Robo PHP Task Runner
greg.1.anderson
Robo is a PHP task runner that uses common Object-Oriented PHP constructs to set up and run tasks. Using chained initializers and Robo’s comprehensive set of built-in common tasks, it is easy to write, and easy to read short lightweight commands to automate development, testing and deployment operations. Robo is based on Symfony/Console, and can serve as a useful class library to make it easier to write Symfony Console tools.
This session will examine:
- The basics of writing and using simple Robo scripts.
- Using Robo collections and rollback handlers to write fault-tolerant scripts.
- Using Robo to provide Composer scripts.
- Using Robo as a class library in Symfony Console Tools, as Drush 9 does.
- How to create your own tasks for use in your Robo commands.
- How to create Robo tasks using an existing PHP class library, as Robo does with the Symfony\Filesystem component.
- How Robo uses League/Container for dependency injection, the benefits of inflectors, and how this compares with the Symfony Dependency Injection container.
A basic understanding of PHP is assumed.
After attending this session, you will learn how to use and extend Robo, and will also pick up some interesting techniques used inside Robo that may be of use in other contexts as well.