diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-23 01:18:58 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-23 01:18:58 +0900 |
| commit | 7372dc668476cde4bcb789e586cb9a65af1afca0 (patch) | |
| tree | aeeec34820b3714698407c32fc16942002129561 /crates/mozart/src/commands/install.rs | |
| parent | 40bd784824dc5f40e22908ff35d4ae693696ba89 (diff) | |
| download | php-mozart-7372dc668476cde4bcb789e586cb9a65af1afca0.tar.gz php-mozart-7372dc668476cde4bcb789e586cb9a65af1afca0.tar.zst php-mozart-7372dc668476cde4bcb789e586cb9a65af1afca0.zip | |
fix(dump-autoload): add config defaults, CLI validation, and class count output
Read optimize-autoloader, classmap-authoritative, apcu-autoloader from
composer.json config section. Reject --dev with --no-dev and --strict-psr/
--strict-ambiguous without --optimize. Emit pre/post generation messages
with class count in optimized mode. Track ambiguous class mappings and
exit with code 2 when --strict-ambiguous detects conflicts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart/src/commands/install.rs')
| -rw-r--r-- | crates/mozart/src/commands/install.rs | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/crates/mozart/src/commands/install.rs b/crates/mozart/src/commands/install.rs index 4105a7b..f29c992 100644 --- a/crates/mozart/src/commands/install.rs +++ b/crates/mozart/src/commands/install.rs @@ -476,19 +476,21 @@ pub async fn install_from_lock( let suffix = lock.content_hash.clone(); - mozart_autoload::autoload::generate(&mozart_autoload::autoload::AutoloadConfig { - project_dir: working_dir.to_path_buf(), - vendor_dir: vendor_dir.to_path_buf(), - dev_mode, - suffix, - classmap_authoritative: config.classmap_authoritative, - optimize: config.optimize_autoloader, - apcu: config.apcu_autoloader, - apcu_prefix: config.apcu_autoloader_prefix.clone(), - strict_psr: false, - platform_check: mozart_autoload::autoload::PlatformCheckMode::Full, - ignore_platform_reqs: config.ignore_platform_reqs, - })?; + let _result = + mozart_autoload::autoload::generate(&mozart_autoload::autoload::AutoloadConfig { + project_dir: working_dir.to_path_buf(), + vendor_dir: vendor_dir.to_path_buf(), + dev_mode, + suffix, + classmap_authoritative: config.classmap_authoritative, + optimize: config.optimize_autoloader, + apcu: config.apcu_autoloader, + apcu_prefix: config.apcu_autoloader_prefix.clone(), + strict_psr: false, + strict_ambiguous: false, + platform_check: mozart_autoload::autoload::PlatformCheckMode::Full, + ignore_platform_reqs: config.ignore_platform_reqs, + })?; eprintln!("Generated autoload files"); } |
