diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-06 18:05:27 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-06 18:05:27 +0900 |
| commit | 3d128352f93c4416d087069947920e9fa864df7d (patch) | |
| tree | 52026a6ae07ad0dbc2a62e487dd4d9550992e3b8 /crates/mozart/src/commands/archive.rs | |
| parent | 4a9aff1af9fc74d2928fe54210d6aad5f0afd0b7 (diff) | |
| download | php-mozart-3d128352f93c4416d087069947920e9fa864df7d.tar.gz php-mozart-3d128352f93c4416d087069947920e9fa864df7d.tar.zst php-mozart-3d128352f93c4416d087069947920e9fa864df7d.zip | |
feat(core): port Factory::createComposer and AutoloadGenerator::dump
Add the Composer state-container types (LocalRepository,
RepositoryManager, InstallationManager, AutoloadGenerator,
AutoloadDumpOptions, PlatformRequirementFilter, Locker) plus the
factory wiring that builds them from composer.json and
vendor/composer/installed.json.
AutoloadGenerator::dump lives in mozart-autoload as an extension
trait so the orchestrating algorithm sits next to the classmap
scanner while the state container stays in mozart-core. Rework
dump-autoload to drive both, mirroring
$composer->getAutoloadGenerator()->dump(...).
Diffstat (limited to 'crates/mozart/src/commands/archive.rs')
| -rw-r--r-- | crates/mozart/src/commands/archive.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/mozart/src/commands/archive.rs b/crates/mozart/src/commands/archive.rs index 044178f..b02e44e 100644 --- a/crates/mozart/src/commands/archive.rs +++ b/crates/mozart/src/commands/archive.rs @@ -1,4 +1,5 @@ use clap::Args; +use mozart_core::composer::Composer; use mozart_core::console_writeln; use std::path::PathBuf; @@ -99,7 +100,7 @@ pub async fn execute( // `archive` command falls back to `Factory::createConfig()` when no // composer.json is present, so we mirror that by treating a missing // file as "use defaults" (Composer::try_load returns None). - let composer = mozart_core::composer::Composer::try_load(&working_dir)?; + let composer = Composer::try_load(&working_dir)?; let composer_json_path = working_dir.join("composer.json"); let (config_archive_format, config_archive_dir) = match composer.as_ref() { Some(c) => { |
