Symfony 8.1 brings several improvements to the Console component. Progress bars now automatically emit OSC 9;4 escape sequences to report progress in the terminal taskbar, with static pauseAll()/resumeAll() methods for pausing during user prompts. A new optional $format argument on createProgressBar(), progressStart(), and progressIterate() allows setting custom formats in a single step. For testing, the new CommandTester::run() method returns an ExecutionResult object exposing stdout, stderr, and interleaved output simultaneously, along with a ConsoleAssertionsTrait for expressive assertions. KernelTestCase gains a runCommand() shortcut to reduce boilerplate in functional tests. Two new assertions, assertCommandFailed() and assertCommandIsInvalid(), complete the command status assertion set.

4m read timeFrom symfony.com
Post cover image
4.3K Impressions