diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-09 18:44:31 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-09 18:44:31 +0900 |
| commit | f9671f2dcde92d5c037595d0d3f01396a8190970 (patch) | |
| tree | 56e1bfcb8f9940a49bd9e658c982514cdde0c367 /crates/mozart-core/src/config.rs | |
| parent | 0802fd44ed11283f15900d2993fc495acf1bed01 (diff) | |
| download | php-mozart-f9671f2dcde92d5c037595d0d3f01396a8190970.tar.gz php-mozart-f9671f2dcde92d5c037595d0d3f01396a8190970.tar.zst php-mozart-f9671f2dcde92d5c037595d0d3f01396a8190970.zip | |
refactor(composer): move Composer and Factory from mozart-core to mozart
Composer needs DownloadManager (from mozart-registry), but mozart-core
sits below mozart-registry in the dependency graph — adding the field
would create a dependency cycle. Moving Composer and create_composer to
the mozart CLI crate breaks the cycle and lets the root state container
hold a DownloadManager.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart-core/src/config.rs')
| -rw-r--r-- | crates/mozart-core/src/config.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/mozart-core/src/config.rs b/crates/mozart-core/src/config.rs index cbb3ba6..1220dee 100644 --- a/crates/mozart-core/src/config.rs +++ b/crates/mozart-core/src/config.rs @@ -328,12 +328,6 @@ impl Config { } } -fn substitute(s: &str, vendor_dir: &str, home: &str, cache_dir: &str) -> String { - s.replace("{$vendor-dir}", vendor_dir) - .replace("{$home}", home) - .replace("{$cache-dir}", cache_dir) -} - /// Resolve `{$vendor-dir}`, `{$home}`, and `{$cache-dir}` placeholders in /// string-valued fields. Only one pass is performed (no recursive expansion). pub fn resolve_references(config: &mut Config) { @@ -368,3 +362,9 @@ pub fn resolve_references(config: &mut Config) { } } } + +fn substitute(s: &str, vendor_dir: &str, home: &str, cache_dir: &str) -> String { + s.replace("{$vendor-dir}", vendor_dir) + .replace("{$home}", home) + .replace("{$cache-dir}", cache_dir) +} |
