diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-16 12:36:16 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-16 12:36:16 +0900 |
| commit | b12c2b15f0487d54d359a581e99ced68713914d0 (patch) | |
| tree | 4e594a540f189f7e933766f9c922cc1fcf1424da /crates/shirabe-php-rpc/php/guards/Composer/Package/Loader | |
| parent | 45f0ae17ce5528af2af66fd681e88fe4a4a7cd6e (diff) | |
| download | php-shirabe-b12c2b15f0487d54d359a581e99ced68713914d0.tar.gz php-shirabe-b12c2b15f0487d54d359a581e99ced68713914d0.tar.zst php-shirabe-b12c2b15f0487d54d359a581e99ced68713914d0.zip | |
fix(config): stringify cache-files-maxsize like PHP's (string) cast
Config::get() resolves cache-files-maxsize by matching the stored value
against a size regex. The port read that value with as_string(), which
yields None for anything that is not a string, where PHP casts with
(string).
create-project feeds Config::all() back through Config::merge(), so the
second read finds the byte count the first read produced rather than the
original "300MiB". as_string() then yields an empty string, the regex
fails, and the resulting RuntimeException is swallowed by Config::get(),
which maps Err to null. FileDownloader turns that null into a zero max
size via .as_int().unwrap_or(0), and Cache::gc() deletes every file in
the download cache because the total always exceeds zero.
Apply the same cast on the path branch, the other site where Config.php
writes (string).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-php-rpc/php/guards/Composer/Package/Loader')
0 files changed, 0 insertions, 0 deletions
