diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-03 20:03:42 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-03 20:03:42 +0900 |
| commit | d3cdb9e3f73314e04061d4d18f654e7e80b0dc18 (patch) | |
| tree | 92dfda3903a7a7f1c631b18eaf544063e9b7f4f6 /crates/mozart | |
| parent | 756e0b9c18af8b2b5887ae1fb265a03187ca9c00 (diff) | |
| download | php-mozart-d3cdb9e3f73314e04061d4d18f654e7e80b0dc18.tar.gz php-mozart-d3cdb9e3f73314e04061d4d18f654e7e80b0dc18.tar.zst php-mozart-d3cdb9e3f73314e04061d4d18f654e7e80b0dc18.zip | |
feat(repository): support only/exclude/canonical repo filters
Composer's FilterRepository wraps a repository with three knobs:
`only` / `exclude` to drop packages by name, and `canonical: false` to
relax the repo's authoritative claim on its package names so
lower-priority repos can still answer. Mozart was ignoring all three,
so first-listed inline / composer-repo entries always shadowed later
repos and `only` / `exclude` lists were silently no-ops.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart')
| -rw-r--r-- | crates/mozart/src/commands/init.rs | 6 | ||||
| -rw-r--r-- | crates/mozart/tests/installer.rs | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/crates/mozart/src/commands/init.rs b/crates/mozart/src/commands/init.rs index 49176ab..1a6df37 100644 --- a/crates/mozart/src/commands/init.rs +++ b/crates/mozart/src/commands/init.rs @@ -704,6 +704,9 @@ fn parse_repositories(repos: &[String]) -> anyhow::Result<Vec<RawRepository>> { repo_type, url: Some(url), package: None, + only: None, + exclude: None, + canonical: None, }); } else { // Plain URL @@ -711,6 +714,9 @@ fn parse_repositories(repos: &[String]) -> anyhow::Result<Vec<RawRepository>> { repo_type: "vcs".to_string(), url: Some(repo.clone()), package: None, + only: None, + exclude: None, + canonical: None, }); } } diff --git a/crates/mozart/tests/installer.rs b/crates/mozart/tests/installer.rs index 8564d0c..cd00f88 100644 --- a/crates/mozart/tests/installer.rs +++ b/crates/mozart/tests/installer.rs @@ -333,7 +333,7 @@ installer_fixture!(replaced_packages_should_not_be_installed_when_installing_fro installer_fixture!(replacer_satisfies_its_own_requirement); installer_fixture!(repositories_priorities); installer_fixture!(repositories_priorities2); -installer_fixture!(repositories_priorities3, ignore); +installer_fixture!(repositories_priorities3); installer_fixture!(repositories_priorities4); installer_fixture!(repositories_priorities5); installer_fixture!(root_alias_change_with_circular_dep, ignore); |
