Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Tomas Votruba:
Stylish and Standard Console Output with Symfony Style
Aug 07, 2018 @ 15:28:12

Tomas Votruba has continued his series covering the use of the Symfony Console component with a new tutorial. In this latest article he shows how to get "stylish and standard console output" using the output formatting included with the package.

Even if you don't use any component from Symfony or even installed one, you can use this trick in your PHP CLI App.

It's simple, provides standard and makes your output look like a design from Apple - useful and nice at the same time.

He starts by introducing the OutputInterface that the Symfony Console package includes and shows a few screenshots of the difference between normal console output and the Console component's look. He also covers the SymfonyStyle functionality that allows for even more fine-grained control over the input and output handling of your application. He finishes the post showing a few tips on integrating these styles into your command line application and setting it up to fetch SymfonyStyle as a service.

tagged: symfony console component tutorial series style output input

Link: https://www.tomasvotruba.cz/blog/2018/08/06/stylish-and-standard-console-output-with-symfony-style/


Trending Topics: