aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands/create_project.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-02 18:04:29 +0900
committernsfisis <nsfisis@gmail.com>2026-05-02 18:04:29 +0900
commit33fe16285acbed1f5146c2d746eba2295bd57688 (patch)
tree0df8f83fd9e95e87406e350ce48816451b6d07af /crates/mozart/src/commands/create_project.rs
parent82501a36a0fa6725d656742da42c860e75a89b89 (diff)
parentc446337e75ba9fd674dd63d56ec25d7bd5b5fa31 (diff)
downloadphp-mozart-33fe16285acbed1f5146c2d746eba2295bd57688.tar.gz
php-mozart-33fe16285acbed1f5146c2d746eba2295bd57688.tar.zst
php-mozart-33fe16285acbed1f5146c2d746eba2295bd57688.zip
Merge branch 'test/di'
Diffstat (limited to 'crates/mozart/src/commands/create_project.rs')
-rw-r--r--crates/mozart/src/commands/create_project.rs15
1 files changed, 11 insertions, 4 deletions
diff --git a/crates/mozart/src/commands/create_project.rs b/crates/mozart/src/commands/create_project.rs
index a137868..92081d0 100644
--- a/crates/mozart/src/commands/create_project.rs
+++ b/crates/mozart/src/commands/create_project.rs
@@ -419,9 +419,11 @@ pub async fn execute(
platform: PlatformConfig::new(),
ignore_platform_reqs: args.ignore_platform_reqs,
ignore_platform_req_list: args.ignore_platform_req.clone(),
- repo_cache: repo_cache.clone(),
+ repositories: std::sync::Arc::new(
+ mozart_registry::repository::RepositorySet::with_packagist(repo_cache.clone()),
+ ),
temporary_constraints: HashMap::new(),
- repositories: raw.repositories.clone(),
+ raw_repositories: raw.repositories.clone(),
};
console.info("Resolving dependencies...");
@@ -440,7 +442,9 @@ pub async fn execute(
composer_json_content: composer_json_content.clone(),
composer_json: raw.clone(),
include_dev: dev_mode,
- repo_cache: repo_cache.clone(),
+ repositories: std::sync::Arc::new(
+ mozart_registry::repository::RepositorySet::with_packagist(repo_cache.clone()),
+ ),
})
.await?;
@@ -497,6 +501,9 @@ pub async fn execute(
.and_then(|v| v.as_bool())
.unwrap_or(false);
+ let cache_config = mozart_registry::cache::build_cache_config(cli.no_cache);
+ let files_cache = mozart_registry::cache::Cache::files(&cache_config);
+ let mut executor = mozart_registry::installer_executor::FilesystemExecutor::new(files_cache);
super::install::install_from_lock(
&new_lock,
&target_dir,
@@ -514,9 +521,9 @@ pub async fn execute(
apcu_autoloader_prefix: None,
download_only: false,
prefer_source: args.prefer_source,
- no_cache: cli.no_cache,
},
console,
+ &mut executor,
)
.await?;