diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-08 02:23:31 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-08 02:23:31 +0900 |
| commit | 06368584a9277022d9cfc42d22c37f4cc6e580f8 (patch) | |
| tree | a210e77273316ce94530391ea4e6dc4ee60b42ea /crates/shirabe-external-packages/src/symfony/process | |
| parent | 318ea948f5932dfa7942081a269d62fd7161a9bf (diff) | |
| download | php-shirabe-06368584a9277022d9cfc42d22c37f4cc6e580f8.tar.gz php-shirabe-06368584a9277022d9cfc42d22c37f4cc6e580f8.tar.zst php-shirabe-06368584a9277022d9cfc42d22c37f4cc6e580f8.zip | |
refactor(external-packages): drop component segment from symfony paths
Align the Symfony namespace mapping with the documented convention
(symfony::component::X -> symfony::X) and remove now-unused console
stub files. Update all import paths across the workspace.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/process')
7 files changed, 190 insertions, 0 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/process/exception/mod.rs b/crates/shirabe-external-packages/src/symfony/process/exception/mod.rs new file mode 100644 index 0000000..8d275c1 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/process/exception/mod.rs @@ -0,0 +1,7 @@ +pub mod process_signaled_exception; +pub mod process_timed_out_exception; +pub mod runtime_exception; + +pub use process_signaled_exception::*; +pub use process_timed_out_exception::*; +pub use runtime_exception::*; diff --git a/crates/shirabe-external-packages/src/symfony/process/exception/process_signaled_exception.rs b/crates/shirabe-external-packages/src/symfony/process/exception/process_signaled_exception.rs new file mode 100644 index 0000000..154a7a7 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/process/exception/process_signaled_exception.rs @@ -0,0 +1,13 @@ +#[derive(Debug)] +pub struct ProcessSignaledException { + pub message: String, + pub code: i64, +} + +impl std::fmt::Display for ProcessSignaledException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.message) + } +} + +impl std::error::Error for ProcessSignaledException {} diff --git a/crates/shirabe-external-packages/src/symfony/process/exception/process_timed_out_exception.rs b/crates/shirabe-external-packages/src/symfony/process/exception/process_timed_out_exception.rs new file mode 100644 index 0000000..cbcdaa4 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/process/exception/process_timed_out_exception.rs @@ -0,0 +1,13 @@ +#[derive(Debug)] +pub struct ProcessTimedOutException { + pub message: String, + pub code: i64, +} + +impl std::fmt::Display for ProcessTimedOutException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.message) + } +} + +impl std::error::Error for ProcessTimedOutException {} diff --git a/crates/shirabe-external-packages/src/symfony/process/exception/runtime_exception.rs b/crates/shirabe-external-packages/src/symfony/process/exception/runtime_exception.rs new file mode 100644 index 0000000..3ac2c8b --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/process/exception/runtime_exception.rs @@ -0,0 +1,13 @@ +#[derive(Debug)] +pub struct RuntimeException { + pub message: String, + pub code: i64, +} + +impl std::fmt::Display for RuntimeException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.message) + } +} + +impl std::error::Error for RuntimeException {} diff --git a/crates/shirabe-external-packages/src/symfony/process/mod.rs b/crates/shirabe-external-packages/src/symfony/process/mod.rs index aeca4ff..6dd64e1 100644 --- a/crates/shirabe-external-packages/src/symfony/process/mod.rs +++ b/crates/shirabe-external-packages/src/symfony/process/mod.rs @@ -1,3 +1,9 @@ +pub mod exception; pub mod executable_finder; +pub mod php_executable_finder; +pub mod process; +pub use exception::*; pub use executable_finder::*; +pub use php_executable_finder::*; +pub use process::*; diff --git a/crates/shirabe-external-packages/src/symfony/process/php_executable_finder.rs b/crates/shirabe-external-packages/src/symfony/process/php_executable_finder.rs new file mode 100644 index 0000000..0346d10 --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/process/php_executable_finder.rs @@ -0,0 +1,22 @@ +#[derive(Debug)] +pub struct PhpExecutableFinder; + +impl Default for PhpExecutableFinder { + fn default() -> Self { + Self::new() + } +} + +impl PhpExecutableFinder { + pub fn new() -> Self { + todo!() + } + + pub fn find(&self, _include_args: bool) -> Option<String> { + todo!() + } + + pub fn find_arguments(&self) -> Vec<String> { + todo!() + } +} diff --git a/crates/shirabe-external-packages/src/symfony/process/process.rs b/crates/shirabe-external-packages/src/symfony/process/process.rs new file mode 100644 index 0000000..227606b --- /dev/null +++ b/crates/shirabe-external-packages/src/symfony/process/process.rs @@ -0,0 +1,116 @@ +use indexmap::IndexMap; + +#[derive(Debug)] +pub struct Process; + +impl Process { + pub const ERR: &'static str = "err"; + pub const OUT: &'static str = "out"; + + pub fn new( + _command: Vec<String>, + _cwd: Option<String>, + _env: Option<IndexMap<String, String>>, + _input: Option<String>, + _timeout: Option<f64>, + ) -> Self { + todo!() + } + + pub fn from_shell_commandline( + _command: &str, + _cwd: Option<&str>, + _env: Option<IndexMap<String, String>>, + _input: Option<String>, + _timeout: Option<f64>, + ) -> Self { + todo!() + } + + pub fn set_timeout(&mut self, _timeout: Option<f64>) -> &mut Self { + todo!() + } + + pub fn set_env(&mut self, _env: IndexMap<String, String>) -> &mut Self { + todo!() + } + + pub fn set_input(&mut self, _input: Option<String>) -> &mut Self { + todo!() + } + + pub fn run(&mut self, _callback: Option<Box<dyn FnMut(&str, &str)>>) -> i64 { + todo!() + } + + pub fn must_run( + &mut self, + _callback: Option<Box<dyn FnMut(&str, &str)>>, + ) -> anyhow::Result<&mut Self> { + todo!() + } + + pub fn start(&mut self, _callback: Option<Box<dyn FnMut(&str, &str)>>) { + todo!() + } + + pub fn wait(&mut self, _callback: Option<Box<dyn FnMut(&str, &str)>>) -> i64 { + todo!() + } + + pub fn stop(&mut self, _timeout: f64, _signal: Option<i64>) -> Option<i64> { + todo!() + } + + pub fn is_running(&self) -> bool { + todo!() + } + + pub fn is_successful(&self) -> bool { + todo!() + } + + pub fn is_started(&self) -> bool { + todo!() + } + + pub fn is_terminated(&self) -> bool { + todo!() + } + + pub fn get_output(&self) -> String { + todo!() + } + + pub fn get_error_output(&self) -> String { + todo!() + } + + pub fn get_exit_code(&self) -> Option<i64> { + todo!() + } + + pub fn get_exit_code_text(&self) -> Option<String> { + todo!() + } + + pub fn get_command_line(&self) -> String { + todo!() + } + + pub fn check_timeout(&self) -> anyhow::Result<()> { + todo!() + } + + pub fn get_timeout(&self) -> Option<f64> { + todo!() + } + + pub fn set_working_directory(&mut self, _cwd: &str) -> &mut Self { + todo!() + } + + pub fn set_tty(&mut self, _tty: bool) -> anyhow::Result<&mut Self> { + todo!() + } +} |
