- What is symfony/tui used for?
- The Symfony TUI component is a terminal UI framework for building rich, interactive command-line applications in PHP. It provides building blocks such as dynamic tables, forms, progress bars, and terminal widgets that go beyond plain console output. It is best suited to CLI-first tools, interactive scripts, and internal utilities rather than HTTP-facing applications.
- Does symfony/tui integrate with Laravel Artisan commands?
- Yes, symfony/tui can enhance custom Artisan commands by replacing basic echo output or prompt() calls with richer TUI components. You can use it for interactive table selection, forms, progress bars, and terminal dashboards inside Laravel CLI tools. It has no Laravel-specific dependencies, so integration is a matter of wiring it into your command classes.
- What PHP version does symfony/tui require?
- The Symfony TUI 8.x line requires PHP 8.4 or newer, so your Laravel version must also support running on PHP 8.4. There are no Laravel-specific dependencies, but you need a PHP CLI environment. Check your Laravel and deployment PHP versions before adopting it.
- Is symfony/tui stable enough for production use?
- Symfony TUI is marked experimental and is not covered by Symfony's backward compatibility promise. That means APIs may change between releases without the usual deprecation cycle. It can still be used for internal tools and developer workflows where you control upgrades, but treat it as a fast-moving dependency.
- How do I install symfony/tui in a Laravel project?
- Install it with Composer using a constraint such as ^8.1.9 so the accumulated terminal input and width fixes land together. Run composer require symfony/tui:^8.1.9 in your project. Because it requires PHP 8.4+, confirm your environment satisfies that before installation.
- Can symfony/tui render tables with Unicode, CJK, or emoji correctly?
- Yes, v8.1.9 includes fixes for Unicode, CJK, and emoji column measurement, making TUI tables viable for internationalized data such as names, messages, and addresses. Emoji ZWJ sequences, modifiers, and tag sequences now measure as two columns, and invalid UTF-8 no longer collapses to zero columns. Remaining width issues are more likely to come from host locale or LANG misconfiguration than from the library.
- Does symfony/tui work across terminals like tmux, Termux, and Kitty?
- v8.1.9 hardens cross-platform behavior with fixes for Termux height-only resize repaints, Kitty keypad and escape handling, bracketed-paste decoding in tmux, and terminals without the Kitty protocol. Residual risk is concentrated in niche emulators and older Windows consoles rather than mainstream terminals. Incomplete escape sequences no longer stall input, reducing the chance of a frozen CLI.
- How does symfony/tui compare to Symfony Console or Laravel's prompt helper?
- Symfony Console provides the foundation for commands, input, and output, while symfony/tui adds higher-level terminal UI components on top. Laravel's prompt() helper covers simple interactive questions, but symfony/tui is aimed at dynamic interfaces such as tables, forms, and dashboards. If your needs are basic, plain Symfony Console or prompt() may be sufficient and simpler.
- What are the main risks of adopting symfony/tui?
- The main risks are a medium learning curve for TUI patterns, performance overhead in slow CLI environments when rendering rich dynamic tables, and dependency bloat if added to a pure HTTP Laravel app without a clear CLI use case. Cross-platform quirks are reduced in v8.1.9 but can still appear in niche emulators or older Windows consoles. The high-frequency patch cadence also means you should budget a recurring patch-upgrade slot rather than freezing a version.
- What changed in symfony/tui v8.1.9 and should I pin it?
- v8.1.9 is a patch release with 18 bug fixes and no new features, deprecations, or breaking changes. It focuses on rendering correctness, including Unicode width, MarkdownWidget, terminal input, and resize handling. Pinning ^8.1.9 is sensible so those fixes land together, and you should treat 8.1.x as a single quality baseline rather than cherry-picking patches.