- Does stecman/symfony-console-completion work with Laravel Artisan?
- Yes, it operates at the Symfony Console layer that Artisan is built on, so command name and option completion works with zero configuration. For greenfield Laravel 9 to 12 projects, though, the maintainers now advise targeting symfony/console's native completion API instead of adopting this package as a new dependency.
- How do I install stecman/symfony-console-completion in a Laravel application?
- Install it with composer require stecman/symfony-console-completion, then expose the CompletionCommand through your console kernel, mirroring how standalone Symfony Console apps add it to Application::getDefaultCommands() and Symfony Framework apps register it as a tagged console.command service. After that, run the completion registration step for bash or zsh so your shell knows how to call the command.
- How do I enable tab completion for Artisan commands in bash or zsh?
- Register the CompletionCommand, then run the completion registration script it provides in your terminal, pointing it at the program you use to launch Artisan, such as php artisan. The generated snippet is added to your bash or zsh profile, after which tab completion resolves command names and options automatically with no further configuration.
- Can I define custom completion for argument and option values?
- Yes, user code can define custom completion behaviour for argument and option values using the package's completer mechanisms. Be aware that since v0.16.0 the package queries Symfony Console's native completion API first and only falls back to stecman-specific mechanisms when no values are supplied, so a custom completer may not fire if the upstream API already returns suggestions.
- Is stecman/symfony-console-completion still maintained or deprecated?
- The package is in maintenance and support mode with an explicit sunset direction: the maintainers recommend using Symfony's native completion API and describe v0.16.0 as a transition away from this library. No end-of-support date has been stated, and continued patch releases for future Symfony and Laravel compatibility are not guaranteed.
- Why did my completion suggestions change after upgrading to v0.16.0?
- In v0.16.0, value completion resolves through symfony/console's native completion API first and only falls back to the package's own mechanisms when no values are supplied. That means commands with dynamic or enumerated arguments can return a different suggestion set than they did on v0.15.x, which is a silent behaviour change rather than a hard break.
- What is the best alternative to this package for Laravel completion?
- Symfony Console's native completion API, built on CompletionInput and CompletionSuggestions, is the strategic replacement and is available in Symfony 5.4+, 6.x and 7.x, so it is reachable from modern Laravel versions through dependencies the framework already pulls in. Migrating to it means zero net-new third-party dependencies for the eventual target state.
- Does this package support fish shell as well as bash and zsh?
- It targets BASH and ZSH only; fish and other shells are not covered, and shell-specific edge cases remain unaddressed in the maintainers' upgrade notes. If fish support is a requirement, plan around Symfony's native completion integration or a shell-specific setup rather than relying on this package.
- Can I run Symfony native completion and stecman completers side by side during a migration?
- You can, because v0.16.0 resolves through Symfony's API first and falls back to stecman mechanisms only when no values are provided. The risk is split-brain completion, where some commands suggest values via the Symfony API and others via legacy completers, producing inconsistent behaviour that is hard to diagnose. Inventory every command using stecman-specific mechanisms early so you can confirm whether the Symfony-first path is opt-out-able for your setup.
- How do I migrate a Laravel app off stecman/symfony-console-completion?
- Treat v0.16.0 as the first step of an exit rather than a routine upgrade. Pin it, confirm parity, inventory every command that relies on stecman completers or closures, classify each as portable to Symfony's CompletionInput and CompletionSuggestions API or as having no equivalent, then port command by command. Once no command depends on the package's own mechanisms, drop the dependency and regenerate your shell completion scripts.