diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-24 04:16:08 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-24 04:16:08 +0900 |
| commit | e87d37a294a4c754585309d391d793a2c9a1287e (patch) | |
| tree | cc9ebf30f30355be0545a02462162c534516ca8b /crates/shirabe-external-packages/src/symfony/console/descriptor/json_descriptor.rs | |
| parent | f1af14b1cc503ac20f56a79a96c7780d02bdfe75 (diff) | |
| download | php-shirabe-e87d37a294a4c754585309d391d793a2c9a1287e.tar.gz php-shirabe-e87d37a294a4c754585309d391d793a2c9a1287e.tar.zst php-shirabe-e87d37a294a4c754585309d391d793a2c9a1287e.zip | |
feat(console): implement application description for `list`
Replace the todo!() in TextDescriptor::describe_application with a real
option-only InputDefinition built via InputDefinition::from_options,
which shares InputOption behind Rc instead of reconstructing by value.
Drop the now-unused Command::clone_box and switch the descriptors to
borrow the shared commands directly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/console/descriptor/json_descriptor.rs')
| -rw-r--r-- | crates/shirabe-external-packages/src/symfony/console/descriptor/json_descriptor.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/console/descriptor/json_descriptor.rs b/crates/shirabe-external-packages/src/symfony/console/descriptor/json_descriptor.rs index 6dd64f3..4f8e335 100644 --- a/crates/shirabe-external-packages/src/symfony/console/descriptor/json_descriptor.rs +++ b/crates/shirabe-external-packages/src/symfony/console/descriptor/json_descriptor.rs @@ -78,14 +78,10 @@ impl JsonDescriptor { let mut commands: Vec<PhpMixed> = vec![]; let short = matches!(options.get("short"), Some(PhpMixed::Bool(true))); - let command_list: Vec<_> = description - .get_commands() - .values() - .map(|c| c.borrow().clone_box()) - .collect(); - for command in command_list { + for command in description.get_commands().values() { + let command = command.borrow(); commands.push(PhpMixed::Array( - self.get_command_data(command.as_ref(), short)? + self.get_command_data(&*command, short)? .into_iter() .collect(), )); |
