Symfony Console Component: Creating Custom Commands
What you'll learn
- How to create custom commands with the Symfony console component
- Configuration of the console component
- Registering the Command
- Executing the Command
- Understanding how Console Arguments and Options Are Handled
- Input and Output objects
- Testing Commands
- Building a single Command Application Using Console Commands
- How to Color and Style the Console Output
- How to Make Commands Lazily Loaded
- Basic knowledge of PHP
Command-line interface (CLI) ease a lot day-to-day operations. Your console commands can be used for any recurring task, such as cronjobs, imports, or other batch jobs.
In this course we are going to be learning how to create custom CLI commands in your PHP applications using the Symfony Console component as a standalone project.
The Console component of Symfony eases the creation of beautiful and testable command line interfaces, this component is used by several PHP frameworks as Drupal, Laravel, OroCRM, APIPlatform, Magento, etc.
This course explains how to use the Console features as an independent component in any PHP application. So you do not need to have previous experience with Symfony.
To start with, we'll go ahead and install the Console component using Composer. After installation, we'll build a few examples for demonstration purposes. Will see how to configure, register and executing the commands, how options and arguments are handle, how to testing , how to style a console command with questions, messages, tables, progress bars and how to make commands lazily loaded.
Who this course is for:
- Anyone looking to automate their tasks for developing in PHP
Multimedia degree with a master in Innovation and Research in Informatics in the Barcelona School of informatics of the Polytechnic University of Catalonia. More than 10 years experience in web development and academics jobs. I am a Computer Science engineer and Asthanga yoga practitioner with a passion for teaching.