aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/create_project_command.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-02 11:04:17 +0900
committernsfisis <nsfisis@gmail.com>2026-08-02 11:04:17 +0900
commit2592062434eeb5fe814dbca953d5fd23458bc135 (patch)
tree050fc0b685ca80cd54a1e3ddb2965a3bef2cc593 /crates/shirabe/src/command/create_project_command.rs
parentc241931303448f9449051ea2080c1b65561066f2 (diff)
downloadphp-shirabe-2592062434eeb5fe814dbca953d5fd23458bc135.tar.gz
php-shirabe-2592062434eeb5fe814dbca953d5fd23458bc135.tar.zst
php-shirabe-2592062434eeb5fe814dbca953d5fd23458bc135.zip
feat(symfony-console): implement the shell completion command plumbing
The _complete and completion commands were registered but always panicked: get_class_of_command / instantiate_completion_output / tail_debug_log were todo!() and the completion.bash resource was not shipped. - make Command::complete return anyhow::Result so completion errors propagate to CompleteCommand's catch-all (exit code 2) like PHP - add Command::get_class as the port hook for PHP's get_class() debug log; every command supplies its PHP FQCN via the delegation macro - embed Resources/completion.bash at compile time (single-binary port); get_supported_shells becomes a static list - implement tail_debug_log by moving the shared output handle into the 'static process callback - add OutputInterface::as_console_output so unsupported-shell errors go to stderr as in PHP - fix CompletionInput::bind to keep the argument name PHP assigns in the foreach head even when the loop breaks on the first unset argument; application-level completion always hit this and returned no suggestions Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/create_project_command.rs')
-rw-r--r--crates/shirabe/src/command/create_project_command.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/shirabe/src/command/create_project_command.rs b/crates/shirabe/src/command/create_project_command.rs
index 545ed533..687575b0 100644
--- a/crates/shirabe/src/command/create_project_command.rs
+++ b/crates/shirabe/src/command/create_project_command.rs
@@ -262,7 +262,10 @@ impl Command for CreateProjectCommand {
base_command_initialize(self, input, output)
}
- shirabe_external_packages::delegate_command_trait_impls_to_inner!(base_command_data);
+ shirabe_external_packages::delegate_command_trait_impls_to_inner!(
+ base_command_data,
+ "Composer\\Command\\CreateProjectCommand"
+ );
}
impl BaseCommand for CreateProjectCommand {