aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/base_command.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-23 12:36:15 +0900
committernsfisis <nsfisis@gmail.com>2026-08-23 12:36:15 +0900
commit890a50de2a740cc4c4edba12b37cc9aa4d0efdc5 (patch)
treee9925bfa7874680dde9d229bc869867ad7779b8e /crates/shirabe/src/command/base_command.rs
parent2f07bd12c0c77e8985646a9f21a62a91311d82c0 (diff)
downloadphp-shirabe-890a50de2a740cc4c4edba12b37cc9aa4d0efdc5.tar.gz
php-shirabe-890a50de2a740cc4c4edba12b37cc9aa4d0efdc5.tar.zst
php-shirabe-890a50de2a740cc4c4edba12b37cc9aa4d0efdc5.zip
fix(config-command): print config values PHP would stringify
`config --list` and `config <key>` rendered a value with `as_string()`, which yields None for everything but a string, so every int-valued setting printed as an empty string: `cache-ttl`, `cache-files-ttl` and the resolved value of `cache-files-maxsize`. PHP builds that output by concatenating the value into the message, which casts it, so the ports now go through `php_to_string`. Two more differences in the same rendering path: The `[a, b]` branch flattened the array through `as_list()`, which sees only `PhpMixed::List`, so a keyed array reaching it rendered as `[]`. PHP takes that branch whenever the first key is numeric, so the values now come from `array_values_mixed`, which covers both representations. The raw-vs-resolved comparison deciding between `raw (value)` and `value` compared the two as strings. PHP compares with `!==`, which also compares the type: with a `cache-ttl` of `"15552000"` in composer.json, the raw string and the resolved int are not identical and Composer prints `15552000 (15552000)`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/base_command.rs')
0 files changed, 0 insertions, 0 deletions