diff options
Diffstat (limited to 'crates/shirabe')
| -rw-r--r-- | crates/shirabe/src/console/application.rs | 10 | ||||
| -rw-r--r-- | crates/shirabe/src/event_dispatcher/event_dispatcher.rs | 6 | ||||
| -rw-r--r-- | crates/shirabe/src/factory.rs | 4 | ||||
| -rw-r--r-- | crates/shirabe/src/package/version/version_guesser.rs | 4 | ||||
| -rw-r--r-- | crates/shirabe/src/plugin/plugin_manager.rs | 4 | ||||
| -rw-r--r-- | crates/shirabe/src/repository/repository_manager.rs | 5 | ||||
| -rw-r--r-- | crates/shirabe/src/util/process_executor.rs | 4 | ||||
| -rw-r--r-- | crates/shirabe/tests/command/run_script_command_test.rs | 8 |
8 files changed, 21 insertions, 24 deletions
diff --git a/crates/shirabe/src/console/application.rs b/crates/shirabe/src/console/application.rs index af18cd04..e6cfad35 100644 --- a/crates/shirabe/src/console/application.rs +++ b/crates/shirabe/src/console/application.rs @@ -2391,10 +2391,10 @@ impl ApplicationHandle { // TODO(plugin): `new $dummy($script)` instantiates the // user's PHP command class in-process and registers the // live object on this Application; hosting a PHP-owned - // command here needs the PHP-side Application / command - // proxying of the plugin milestones. The shim - // class_exists above never recognizes user classes, so - // this arm is currently unreachable. + // command here needs a PHP-side Symfony Application and + // command proxying, neither of which exists yet. The + // shim class_exists above never recognizes user + // classes, so this arm is currently unreachable. let _ = shirabe_php_shim::instantiate_class( &dummy_str, vec![PhpMixed::String(script.clone())], @@ -2850,7 +2850,7 @@ impl ApplicationHandle { if Terminal::has_stty_available() { // TODO(phase-c): registers SIGINT/SIGTERM handlers that restore the stty mode via // shell_exec('stty ...'). pcntl signal handlers have no faithful Rust - // equivalent in Phase A. + // equivalent yet. let _stty_mode = shirabe_php_shim::shell_exec("stty -g"); for _signal in [shirabe_php_shim::SIGINT, shirabe_php_shim::SIGTERM] { todo!("register signal handler to restore stty mode"); diff --git a/crates/shirabe/src/event_dispatcher/event_dispatcher.rs b/crates/shirabe/src/event_dispatcher/event_dispatcher.rs index 0bfdd7c7..fad6566e 100644 --- a/crates/shirabe/src/event_dispatcher/event_dispatcher.rs +++ b/crates/shirabe/src/event_dispatcher/event_dispatcher.rs @@ -1649,9 +1649,9 @@ try {{ /// Rust-side [`ClassLoader`]), and at most one live event handle is exposed per dispatched /// call. /// -/// TODO(plugin): this per-call scope stands in for the persistent R table of the plugin -/// activation milestone; a stub retained by the script beyond the call observes an unknown -/// handle error instead of the live object. +/// TODO(plugin): this per-call scope stands in for persistent R-table registration; a stub +/// retained by the script beyond the call observes an unknown handle error instead of the +/// live object. struct ScriptRpcDispatcher<'a> { loader: Option<ClassLoader>, event: Option<(u64, &'a dyn EventInterface)>, diff --git a/crates/shirabe/src/factory.rs b/crates/shirabe/src/factory.rs index 903f6d35..9a84117e 100644 --- a/crates/shirabe/src/factory.rs +++ b/crates/shirabe/src/factory.rs @@ -576,7 +576,7 @@ impl Factory { // initialize composer // - // Phase C: build the whole Composer graph at once with Rc::new_cyclic so that + // The whole Composer graph is built at once with Rc::new_cyclic so that // back-references (the EventDispatcher's composer, etc.) can hold a // PartialComposerWeak (Weak<RefCell<InnerComposer>>). The closure cannot return a // Result, so construction errors are surfaced through `build_error`. @@ -1444,7 +1444,7 @@ impl Factory { config: &std::rc::Rc<std::cell::RefCell<Config>>, options: IndexMap<String, PhpMixed>, ) -> anyhow::Result<HttpDownloader> { - // TODO(plugin): static `$warned` flag — port as a OnceCell or atomic in Phase B. + // TODO(plugin): static `$warned` flag — port as a OnceCell or atomic. static mut WARNED: bool = false; let mut disable_tls = false; // allow running the config command if disable-tls is in the arg list, even if openssl is missing, to allow disabling it via the config command diff --git a/crates/shirabe/src/package/version/version_guesser.rs b/crates/shirabe/src/package/version/version_guesser.rs index d7dc42eb..22b78a59 100644 --- a/crates/shirabe/src/package/version/version_guesser.rs +++ b/crates/shirabe/src/package/version/version_guesser.rs @@ -20,8 +20,8 @@ use shirabe_php_shim::{ }; /// Seam over the parts of [`VersionGuesser`] that consumers depend on, so they can be exercised -/// with a test double. PHP has no such interface; this exists only to allow mocking the concrete -/// `VersionGuesser` (a Phase C seam). +/// with a test double. PHP has no such interface; this exists only to allow mocking the +/// concrete `VersionGuesser`. pub trait VersionGuesserInterface: std::fmt::Debug { fn guess_version( &mut self, diff --git a/crates/shirabe/src/plugin/plugin_manager.rs b/crates/shirabe/src/plugin/plugin_manager.rs index aaee7d5a..d720bcfe 100644 --- a/crates/shirabe/src/plugin/plugin_manager.rs +++ b/crates/shirabe/src/plugin/plugin_manager.rs @@ -1,8 +1,4 @@ //! ref: composer/src/Composer/Plugin/PluginManager.php -//! -//! TODO(plugin): the entire plugin manager subsystem is part of the Plugin API -//! and is not implemented in Phase A. The structure is mirrored verbatim so -//! future plugin support can fill in the runtime hooks. use crate::composer::PartialComposerHandle; use crate::composer::{ComposerHandle, ComposerWeakHandle}; diff --git a/crates/shirabe/src/repository/repository_manager.rs b/crates/shirabe/src/repository/repository_manager.rs index ee5d2d88..5f74fc90 100644 --- a/crates/shirabe/src/repository/repository_manager.rs +++ b/crates/shirabe/src/repository/repository_manager.rs @@ -131,7 +131,8 @@ impl RepositoryManager { cleaned_config.shift_remove("exclude"); cleaned_config.shift_remove("canonical"); - // Phase B: implement dynamic class instantiation by class name + // PHP instantiates `new $class(...)` dynamically; the port matches on the known + // repository class names instead. let repository = self.create_repository_by_class(&class, cleaned_config)?; if let Some(filter_config) = filter_config { @@ -191,7 +192,7 @@ impl RepositoryManager { )?, )), other => todo!( - "Phase B: dynamic class instantiation by class name: {}", + "dynamic class instantiation is not implemented for repository class {}", other ), } diff --git a/crates/shirabe/src/util/process_executor.rs b/crates/shirabe/src/util/process_executor.rs index 7e6011cd..9e89bdd4 100644 --- a/crates/shirabe/src/util/process_executor.rs +++ b/crates/shirabe/src/util/process_executor.rs @@ -1005,7 +1005,7 @@ impl ProcessExecutor { } } -/// Phase B helper trait: convert various command argument forms into `PhpMixed`. +/// Helper trait: convert various command argument forms into `PhpMixed`. pub trait IntoExecCommand { fn into_exec_command(self) -> PhpMixed; } @@ -1187,7 +1187,7 @@ impl<'a> IntoExecOutput<'a> for Box<dyn FnMut(&str, &str) -> bool> { fn write_back(&mut self, _value: String) {} } -/// Phase B helper: accept either `i64` or `PhpMixed` for `set_timeout`. +/// Helper: accept either `i64` or `PhpMixed` for `set_timeout`. pub trait ToTimeoutSeconds { fn to_timeout_seconds(self) -> i64; } diff --git a/crates/shirabe/tests/command/run_script_command_test.rs b/crates/shirabe/tests/command/run_script_command_test.rs index 74d05758..9e213cee 100644 --- a/crates/shirabe/tests/command/run_script_command_test.rs +++ b/crates/shirabe/tests/command/run_script_command_test.rs @@ -122,19 +122,19 @@ fn test_can_define_aliases() { } #[test] -#[ignore = "the test invokes the script name as a top-level composer command, which requires Application::do_run to import the user's PHP Command class (MyCommand.php) as a live application command (todo!() in application.rs; PHP-side Application milestone). The EventDispatcher-side Command-class path alone cannot satisfy the direct invocation and its argument definitions"] +#[ignore = "the test invokes the script name as a top-level composer command, which requires Application::do_run to import the user's PHP Command class (MyCommand.php) as a live application command (todo!() in application.rs; needs a PHP-side Symfony Application, which does not exist yet). The EventDispatcher-side Command-class path alone cannot satisfy the direct invocation and its argument definitions"] fn test_execution_of_simple_symfony_command() { // TODO(phase-d): the test invokes the script name as a top-level composer command, which // requires Application::do_run to import the user's PHP Command class (MyCommand.php) as a - // live application command (todo!() in application.rs; PHP-side Application milestone). + // live application command (todo!() in application.rs; needs a PHP-side Symfony Application, which does not exist yet). todo!() } #[test] -#[ignore = "the test invokes the script name as a top-level composer command, which requires Application::do_run to import the user's PHP Command class (MyCommandWithDefinitions.php) as a live application command (todo!() in application.rs; PHP-side Application milestone). The EventDispatcher-side Command-class path alone cannot satisfy the direct invocation and its argument definitions"] +#[ignore = "the test invokes the script name as a top-level composer command, which requires Application::do_run to import the user's PHP Command class (MyCommandWithDefinitions.php) as a live application command (todo!() in application.rs; needs a PHP-side Symfony Application, which does not exist yet). The EventDispatcher-side Command-class path alone cannot satisfy the direct invocation and its argument definitions"] fn test_execution_of_symfony_command_with_configuration() { // TODO(phase-d): the test invokes the script name as a top-level composer command, which // requires Application::do_run to import the user's PHP Command class (MyCommandWithDefinitions.php) - // as a live application command (todo!() in application.rs; PHP-side Application milestone). + // as a live application command (todo!() in application.rs; needs a PHP-side Symfony Application, which does not exist yet). todo!() } |
