| Age | Commit message (Collapse) | Author |
|
Extract modules from the single `mozart` crate into 5 focused library
crates to improve compilation parallelism and architectural clarity:
- mozart-constraint: version constraint parser (independent)
- mozart-core: base types, console, validation, platform utilities
- mozart-archiver: archive creation (tar, zip, bzip2)
- mozart-registry: Packagist API, cache, resolver, downloader, lockfile
- mozart-autoload: autoloader generation and PHP scanner
Refactor Console::from_cli and build_cache_config to accept primitive
args instead of &Cli to break circular dependencies. Introduce
[workspace.dependencies] for centralized version management. Remove 9
unused direct dependencies from the CLI crate.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Implement Phase 7.2 error handling & UX infrastructure:
- Add exit_code module with MozartError, bail()/bail_silent() helpers,
and Composer-compatible exit code constants (0-5, 100)
- Redesign Console struct with Verbosity enum (Quiet/Normal/Verbose/
VeryVerbose/Debug), ANSI auto-detection via IsTerminal, and
verbosity-gated output methods (info/verbose/debug/error)
- Thread Console through all 33 command execute() signatures
- Replace all std::process::exit() calls with structured MozartError
returns handled in main()
- Migrate eprintln\! status messages to console.info() for quiet-mode
suppression
- Add suggest module with Levenshtein distance and "Did you mean?"
formatting for future package name suggestions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Add archive command supporting zip, tar, tar.gz, and tar.bz2 formats
with .gitattributes export-ignore filtering, composer.json archive.exclude
patterns, remote package archiving via Packagist, and self-exclusion to
prevent archives from including themselves.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Collects platform requirements (php, ext-*, lib-*, composer-*-api) from
lock file, installed.json, and root composer.json, then compares them
against the detected PHP environment. Supports text/JSON output and
exit codes 0 (pass), 1 (failed), 2 (missing).
Extracts shared platform detection into a new platform.rs module,
reused by both check-platform-reqs and show --platform.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
versions
Adds the version_bumper module for constraint manipulation (caret, tilde,
wildcard, GTE, OR constraints, stability flags, dev versions) and wires
it into the bump command with --dev-only, --no-dev-only, --dry-run flags,
package filtering, lock file freshness checks, and content-hash updates.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Implement a cache module with CacheConfig and Cache structs supporting
read/write (string and binary), atomic writes via temp+rename, TTL-based
expiration, and size-limited garbage collection. Wire the repo cache into
packagist.rs and resolver.rs for API response caching, and the files
cache into downloader.rs for dist archive caching. Implement the
clear-cache command with full clear and --gc modes. All existing call
sites pass None for backward compatibility.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
strict-psr
Add PHP file scanner (php_scanner.rs) with class/interface/trait/enum
detection, comment/string/heredoc stripping, and PSR-4/PSR-0 validation.
Extend autoload generation with: classmap directory scanning, --optimize
mode (PSR-4/PSR-0 to classmap), --classmap-authoritative, --apcu caching
with optional prefix, platform_check.php generation, and --strict-psr
violation reporting. Wire new options through dump-autoload, install,
require, update, and remove commands.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Add dependency resolution module using pubgrub v0.3.0 to convert
Composer-style constraints into range-based version solving. Includes
ComposerVersion type with stability ordering, MozartProvider
implementing DependencyProvider, platform package handling, stability
filtering, and conflict support via complement ranges.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Implement autoloader generation that produces all standard Composer
autoloader files (autoload.php, autoload_real.php, autoload_static.php,
autoload_psr4.php, autoload_namespaces.php, autoload_classmap.php,
autoload_files.php, installed.php) plus embeds ClassLoader.php,
InstalledVersions.php, and LICENSE from the Composer submodule. Wire
into the install command (gated by --no-autoloader) and replace the
todo!() in dump-autoload with a working implementation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
downloader modules
Phase 1 infrastructure for the install command:
- constraint: Composer-compatible version parsing and constraint matching
(caret, tilde, wildcard, hyphen range, OR/AND combinators)
- lockfile: composer.lock read/write with content-hash computation
- installed: vendor/composer/installed.json registry (Composer 2.x format)
- downloader: dist archive download with SHA-1 verification and
zip/tar.gz extraction with top-level directory stripping
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Add the require command that updates composer.json with new package
dependencies. When no version constraint is specified, the best version
is resolved from the Packagist p2 API based on minimum-stability.
Includes packagist API client, version comparison/stability detection,
and RawPackageData deserialization support for roundtrip editing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
|
|
|
|
|