diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-07 20:02:49 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-08 00:24:50 +0900 |
| commit | f232d7f9d2936ef84bd904cacd21c12cb7012b34 (patch) | |
| tree | 0fb63c3a08071c109032ff3449cbf8cfebbc4e8b /crates/shirabe/src/advisory | |
| parent | e8d6a57d157ab778108bcb044a3dfa5952d4a5ae (diff) | |
| download | php-shirabe-f232d7f9d2936ef84bd904cacd21c12cb7012b34.tar.gz php-shirabe-f232d7f9d2936ef84bd904cacd21c12cb7012b34.tar.zst php-shirabe-f232d7f9d2936ef84bd904cacd21c12cb7012b34.zip | |
feat(config): implement JsonConfigSource manipulate fallbacks
Replace the 10 fallback-closure todo!()s in manipulate_json with real
PhpMixed manipulation. The fallback rewrites the decoded composer.json
when the JsonManipulator clean update fails.
- manipulate_json: drop the args Vec and array_unshift_ref (the latter
called the array_unshift shim and only existed to thread config through
args). Fallbacks now take &mut config directly and capture typed values,
mirroring the clean closures. fallback returns Result so insertRepository
can throw on a missing reference repository.
- Add private helpers: normalize_repositories_to_list,
dedupe_repositories_by_name, set_nested, unset_nested, is_auth_config_key.
- Faithfully mirror PHP quirks in the dormant fallback path, including the
reset()+foreach double-walk of the first segment in add/removeProperty.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/advisory')
0 files changed, 0 insertions, 0 deletions
