aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-external-packages/src/symfony
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-25 15:37:21 +0900
committernsfisis <nsfisis@gmail.com>2026-06-26 00:20:05 +0900
commit3a883e6912e642a1bcfe68336007eae018207308 (patch)
tree2750519e1bbaaf8caa493bcf1eb15efb143280d9 /crates/shirabe-external-packages/src/symfony
parentd4cdccb8de8758bd46a12283f8df90e020327b99 (diff)
downloadphp-shirabe-3a883e6912e642a1bcfe68336007eae018207308.tar.gz
php-shirabe-3a883e6912e642a1bcfe68336007eae018207308.tar.zst
php-shirabe-3a883e6912e642a1bcfe68336007eae018207308.zip
test: port 35 auth/installer/io/zip/bitbucket tests; implement date_create
Port auth_helper (14), library_installer (8), console_io (7), zip_downloader (3), git_bitbucket_driver (3) tests. Implement date_create/strtotime for the ISO8601/ RFC3339/relative formats Composer uses (unknown input -> None, no silent guess). Fix production bugs: Question::is_assoc list-vs-assoc, auth_helper gitlab-domains list handling, LibraryInstaller RefCell double-borrow, ZipArchive::extract_to ErrorException propagation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony')
-rw-r--r--crates/shirabe-external-packages/src/symfony/console/question/question.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/console/question/question.rs b/crates/shirabe-external-packages/src/symfony/console/question/question.rs
index c93a71e..2ff5f62 100644
--- a/crates/shirabe-external-packages/src/symfony/console/question/question.rs
+++ b/crates/shirabe-external-packages/src/symfony/console/question/question.rs
@@ -304,10 +304,16 @@ impl Question {
}
// PHP: `(bool) \count(array_filter(array_keys($array), 'is_string'))`.
- // PhpMixed models a PHP array as either `List` (sequential int keys) or `Array`
- // (string-keyed map), so the "has string keys" test reduces to the `Array` variant.
+ // A `List` has only sequential int keys, so it is never associative. An `Array` is
+ // associative only when at least one key is a genuine string key; PHP normalizes
+ // canonical-integer string keys (e.g. "0", "12") back to int keys, so those do not count.
+ // The same heuristic (a key is "string" iff it does not parse as an i64) is used by
+ // ConsoleIO::select when computing `$isAssoc` over the choice map.
pub(crate) fn is_assoc(array: &PhpMixed) -> bool {
- matches!(array, PhpMixed::Array(_))
+ match array {
+ PhpMixed::Array(map) => map.keys().any(|key| key.parse::<i64>().is_err()),
+ _ => false,
+ }
}
pub fn is_trimmable(&self) -> bool {