Symfony Console: Build awesome command line scripts with ease

preview_player
Показать описание
Utility scripts to kick off scheduled jobs and perform routing maintenance tasks are integral parts of any web application. You can also use them to easily integrate with your ticketing system, post to slack, or automate any number of tedious daily tasks. However, dealing with command line switches and options, getting user input, and providing meaningful output can be tedious and tricky to do yourself. In this talk, I'll introduce Symfony's console component which can handle a lot of boilerplate code for you so you can focus on the task at hand. After this talk, you'll know how to structure a basic command line app, get user input, and even package it up as a standalone phar file for others to use.


Рекомендации по теме
Комментарии
Автор

I don't understand the part at 5:22 . Am i supposed to create a new composer.json file in the src directory and just paste that code into it?

robertvalentic
Автор

I'm at part 10:15, and when i run the govcon.php file again, the new whatTime command doesn't show up.

I've read through some of the official documentation of symfony/console component, and they say that I have to register the command as a service and tagged with the console.command tag.
How come that wasn't done here?

robertvalentic
Автор

Do you know why linux and mac suxx? Because there is no full path in the command line unless you're root.

eivis
Автор

Bro show us by demonstrating things step by step, you're talking as if we know all the things you're saying. I don't know if any beginner can understand someone who explain things just by showing bunch of code in a photo. Please be more specific while explaining to someone how something works.

adnankasumaj