diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-05 02:48:41 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-05 02:48:41 +0900 |
| commit | ee5d0e84c2060f10c20a4b3e519bf0f928fd170d (patch) | |
| tree | b7ab50ac5674cebc88bea60e5a2c33a59b4482d2 /crates/shirabe/src/command | |
| parent | 11cdaae87c37e479fea6c39447041c312410b101 (diff) | |
| download | php-shirabe-ee5d0e84c2060f10c20a4b3e519bf0f928fd170d.tar.gz php-shirabe-ee5d0e84c2060f10c20a4b3e519bf0f928fd170d.tar.zst php-shirabe-ee5d0e84c2060f10c20a4b3e519bf0f928fd170d.zip | |
feat(plugin): discover and list plugin-provided commands
Port Application::getPluginCommands: resolve the local composer with
plugins force-enabled, fall back to Factory::createGlobal, and collect
commands from CommandProvider capability adapters. PhpCommandProxy now
mirrors name/description/aliases/hidden over RPC so `list` output
matches upstream; input definitions remain TODO(plugin).
PhpClass::php_class_name returns an owned String because PHP-backed
proxies only know their class at runtime (the override-skip warning
prints get_class). CommandProvider::getCommands hands out shared
Rc<RefCell> handles since the commands are stored in the application.
Factory::createGlobal now propagates createConfig errors instead of
swallowing them, and Application::getComposer only catches the
exception classes upstream catches, so a ParsingException reaches
doRun's GithubActionError path as in Composer.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command')
| -rw-r--r-- | crates/shirabe/src/command/base_command.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/shirabe/src/command/base_command.rs b/crates/shirabe/src/command/base_command.rs index 77850e9e..f9682de9 100644 --- a/crates/shirabe/src/command/base_command.rs +++ b/crates/shirabe/src/command/base_command.rs @@ -283,7 +283,7 @@ impl Command for BaseCommandData { } impl PhpClass for BaseCommandData { - fn php_class_name(&self) -> &'static str { + fn php_class_name(&self) -> String { // Forwards to the base state's panicking implementation; concrete commands supply // their own class name through `impl_php_class!`. self.inner.php_class_name() @@ -852,7 +852,7 @@ pub fn base_command_initialize( crate::factory::DisablePlugins::None }; let composer = if composer.is_none() { - Factory::create_global(io.clone(), disable_plugins_kind, disable_scripts) + Factory::create_global(io.clone(), disable_plugins_kind, disable_scripts)? } else { composer }; |
