diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-08 23:03:11 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-08 23:03:11 +0900 |
| commit | eeb845f2f8629e3ccfb8ee1a1ec0602c0f186427 (patch) | |
| tree | 5076422cf70ac92e1bc1e0424f0373100be5fd4c /crates/mozart-core/src/lib.rs | |
| parent | 392cf71170bf2550aa657158e9efd2b890381a94 (diff) | |
| download | php-mozart-eeb845f2f8629e3ccfb8ee1a1ec0602c0f186427.tar.gz php-mozart-eeb845f2f8629e3ccfb8ee1a1ec0602c0f186427.tar.zst php-mozart-eeb845f2f8629e3ccfb8ee1a1ec0602c0f186427.zip | |
fix(repository): align with Composer's RepositoryCommand pipeline
Introduce JsonConfigSource in mozart-core mirroring Composer's
JsonConfigSource fallback logic (add/insert/set-url/remove repository),
and BaseConfigContext mirroring BaseConfigCommand's initialize().
Key behaviour fixes:
- list: synthesise [packagist.org] <disabled> only when no composer-type
repo with a packagist.org host is present (was: always show enabled default)
- disable: idempotent via add_repository(false) matching Composer's branch;
now requires a name (no silent default to packagist.org)
- enable: calls remove_repository only, no extra empty-array cleanup
- set-url: preserves assoc-keyed format instead of converting to list
- get-url: assoc fast-path + unquoted error message matching Composer
- add: use regex pre-check (starts_with '{') instead of trial-parse
- error messages reworded to match Composer verbatim (mozart brand kept)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart-core/src/lib.rs')
| -rw-r--r-- | crates/mozart-core/src/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/mozart-core/src/lib.rs b/crates/mozart-core/src/lib.rs index d898b62..7403d46 100644 --- a/crates/mozart-core/src/lib.rs +++ b/crates/mozart-core/src/lib.rs @@ -2,6 +2,7 @@ extern crate self as mozart_core; pub mod composer; pub mod config; +pub mod config_source; pub mod config_validator; pub mod console; pub mod exit_code; |
