diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-24 05:14:37 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-24 05:19:49 +0900 |
| commit | 6dcc2125974e350d1844c5ce1bb3562e224f3435 (patch) | |
| tree | 7287119a8cd6aad599acb41e796095c3e204c35f /crates/shirabe-external-packages/src/symfony/process | |
| parent | a8623a5e867825400073d2597dfb3118d6624ef7 (diff) | |
| download | php-shirabe-6dcc2125974e350d1844c5ce1bb3562e224f3435.tar.gz php-shirabe-6dcc2125974e350d1844c5ce1bb3562e224f3435.tar.zst php-shirabe-6dcc2125974e350d1844c5ce1bb3562e224f3435.zip | |
refactor(php-shim): remove is_resource/is_resource_value
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/process')
| -rw-r--r-- | crates/shirabe-external-packages/src/symfony/process/pipes/abstract_pipes.rs | 8 | ||||
| -rw-r--r-- | crates/shirabe-external-packages/src/symfony/process/process_utils.rs | 3 |
2 files changed, 3 insertions, 8 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/process/pipes/abstract_pipes.rs b/crates/shirabe-external-packages/src/symfony/process/pipes/abstract_pipes.rs index 5b85813..bafd146 100644 --- a/crates/shirabe-external-packages/src/symfony/process/pipes/abstract_pipes.rs +++ b/crates/shirabe-external-packages/src/symfony/process/pipes/abstract_pipes.rs @@ -17,11 +17,9 @@ impl AbstractPipes { pub fn new(input: PhpMixed) -> Self { let mut input_buffer = String::new(); let stored_input; - // TODO(plugin): `$input instanceof \Iterator` is not modeled. `is_resource` on a PhpMixed is - // always false, so the resource branch never stores input here. - if php::is_resource(&input) { - stored_input = input; - } else if let PhpMixed::String(s) = &input { + // TODO(plugin): `$input instanceof \Iterator` is not modeled. The PHP `is_resource($input)` + // branch never applies: a PhpMixed is never a resource, so input is never stored as-is here. + if let PhpMixed::String(s) = &input { input_buffer = s.clone(); stored_input = PhpMixed::Null; } else { diff --git a/crates/shirabe-external-packages/src/symfony/process/process_utils.rs b/crates/shirabe-external-packages/src/symfony/process/process_utils.rs index aec326f..7287b28 100644 --- a/crates/shirabe-external-packages/src/symfony/process/process_utils.rs +++ b/crates/shirabe-external-packages/src/symfony/process/process_utils.rs @@ -12,9 +12,6 @@ impl ProcessUtils { /// Validates and normalizes a Process input. pub fn validate_input(caller: &str, input: PhpMixed) -> anyhow::Result<PhpMixed> { if !input.is_null() { - if php::is_resource(&input) { - return Ok(input); - } if php::is_string(&input) { return Ok(input); } |
