aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2026-02-22fix(browse): match Composer's error messages, output formatting, and stderr ↵nsfisis
behavior Distinguish "Package not found" from "Invalid or missing repository URL" like Composer's HomeCommand. Add <info> color formatting for --show output, remove the unnecessary "Opening ... in browser" message, and emit a stderr message when no package is specified. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22feat(cli): match Composer's --version output formatnsfisis
Replace clap's built-in --version with custom handler that outputs Composer-compatible version info: Mozart version line, PHP version with binary path, and diagnose hint. Add detect_php_version_and_binary() to mozart-core platform module. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(search): match Composer's --only-vendor and JSON output formatsnsfisis
Deduplicate --only-vendor results to unique vendor names instead of showing full package names. Align JSON output schema with Composer by emitting only name, description, url, and abandoned fields. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22feat(search): display abandoned package indicator in search resultsnsfisis
Parse the `abandoned` field from Packagist search API responses and show a "! Abandoned !" warning inline, matching Composer's behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22refactor(console): add console_format! proc macro and migrate all commandsnsfisis
Introduce a Symfony Console-style tag macro that replaces verbose patterns like `console::info(&format!("text {name}"))` with `console_format!("<info>text {name}</info>")`. Supports all 6 tag types (info, comment, error, question, highlight, warning) with format argument distribution across multiple tagged segments. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(validate): use CamelCase-to-dash name suggestion and propagate ↵nsfisis
dependency exit codes - Replace simple to_lowercase() with sanitize_package_name_component() for uppercase name suggestions (e.g. MyCompany/MyLibrary → my-company/my-library) - Return error/warning counts from validate_dependencies() and merge them into the final exit code, matching Composer behavior Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(suggests): add deduplication and ANSI color outputnsfisis
Deduplicate suggestions by (source, target) pair matching Composer's map-based approach where last reason wins. Add ANSI color formatting using console::info (green) and console::comment (yellow) for package names, suggesters, and the transitive hint message. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(depends): align exit codes and error messages with Composernsfisis
Return exit code 1 when no dependents are found or no packages are installed, matching Composer's behavior. Align error messages: use "Could not find package" and "There is no installed package depending on" phrasing. Write errors to stderr instead of stdout. Apply the same no-install fix to the prohibits command. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(search): validate --only-name/--only-vendor exclusivity and --format valuesnsfisis
Reject simultaneous --only-name and --only-vendor flags with an error, and reject unsupported --format values with exit code 1, matching Composer's input validation behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(bump): align output messages with Composer outputnsfisis
- "Nothing to bump." → "No requirements to update in <path>." - "N constraint(s) bumped successfully." → "<path> has been updated (N changes)." - Dry-run now shows "<path> would be updated with:" followed by " - require.<pkg>: <ver>" per change, matching Composer's format - Also update bump message in update command for consistency Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(licenses): align error messages with Composer outputnsfisis
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(suggests): align output formatting and root package filtering with Composernsfisis
Add blank lines between groups, use 78-dash separator in dual mode, sanitize reason strings by replacing newlines and stripping control characters, and include root package name in direct-deps filter so its suggestions are correctly shown by default. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(clear-cache): enforce 1 GB repo cache size limit during GCnsfisis
Composer caps the repo cache at 1 GB during garbage collection, but Mozart was passing u64::MAX (no limit). Align with Composer behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(about): respect --quiet flag by using console outputnsfisis
Replace direct println\! with console.write_stdout() so the about command honors verbosity settings, matching Composer's behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(bump): return exit code 1 on dry-run with changes and warn when type is ↵nsfisis
absent Match Composer behavior: --dry-run now returns exit code 1 when un-bumped constraints are detected (useful for CI). Also warn when the package type field is missing, since Composer treats it as "library" by default. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22feat(platform): detect lib-* platform packages from PHP environmentnsfisis
Extends the PHP inline script to query constants and functions for 14 library packages (lib-pcre, lib-openssl, lib-curl, lib-libxml, etc.) and parses the new LIB:name:version output format. This fixes SAT resolver failures for packages requiring lib-* constraints like lib-pcre >=7.0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(resolver): handle virtual packages and deduplicate pool explorationnsfisis
Virtual/meta packages (e.g. "psr/http-client-implementation") don't exist on Packagist and caused a fatal error during transitive dependency exploration. These packages are resolved via provides/replaces from other packages already in the pool, so 404 errors are now skipped. Also fix PoolBuilder::next_pending() repeatedly returning the same virtual package name by tracking explored names in a HashSet, since virtual packages are never added to inputs and the old check (inputs.any(name)) never matched them. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(test): correct install command expectation when no lock file presentnsfisis
The install command succeeds with a warning when no lock file exists, rather than failing with a suggestion to run update.
2026-02-22chore: cargo fmtnsfisis
2026-02-22feat(remove): implement --unused flag to prune orphan packagesnsfisis
Re-resolve dependencies and compare with the current lock file to detect packages that are no longer reachable from root requirements. Removes them from the lock file and re-installs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22feat(validate): implement --with-dependencies flagnsfisis
Walk vendor/<vendor>/<package>/composer.json files and run the same manifest validations on each dependency, reporting per-package errors and warnings with a summary count. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22feat(update): implement --patch-only, --root-reqs, --bump-after-updatensfisis
- --patch-only: restrict updates to patch-level changes by pinning packages back to locked versions when major.minor differs - --root-reqs: auto-populate update list with root require/require-dev packages when no explicit packages are specified - --bump-after-update: bump composer.json version constraints to match resolved versions after update, with dev/no-dev/all modes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22feat(core): support AND constraint bumping in version bumpernsfisis
Split AND constraints (e.g. ">=1.0 <2.0" or ">=1.0,<2.0") into parts and bump only the lower-bound operator (>=, ^, ~) while preserving upper-bound operators (<, <=, \!=) unchanged. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22feat(audit): display version info in audit outputnsfisis
Use previously stored but unused fields: show installed_version in advisory tables/plain/JSON output, and package version in abandoned package output. Remove unused unlockable_ids field from LockTransaction. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(registry): handle Stability::Dev in version constraint buildernsfisis
Replace unreachable\!() with proper @dev suffix output. Although Dev is normally handled by an early return, this prevents a panic if the control flow is ever refactored. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22feat(semver): support `==` (double equals) version constraintnsfisis
Parse `==` as an exact match operator, identical to `=`. Previously the `=` handler would strip only one `=`, leaving `=1.2.3` which failed to parse as a version number. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(platform): inject composer pseudo packages into resolvernsfisis
composer-runtime-api, composer-plugin-api, and composer are Composer pseudo packages that don't exist on Packagist. The resolver was trying to fetch them remotely (HTTP 404) because PackageName::is_platform() didn't recognize them and detect_platform() didn't inject them. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22feat(resolver): replace pubgrub with Composer-ported SAT solvernsfisis
Add mozart-sat-resolver crate implementing a CDCL SAT-based dependency resolver ported from Composer's DependencyResolver. This replaces the pubgrub library to ensure identical resolution behavior with Composer. The new crate includes: pool (package storage with integer IDs), rule/rule_set/rule_set_generator (constraint encoding), decisions (assignment tracking), rule_watch_graph (2-watched literal BCP), solver (CDCL loop with conflict analysis and clause learning), policy (version preference), problem (Composer-style error messages), and transaction (install/update/uninstall operation computation). The registry resolver is rewritten to use PoolBuilder → RuleSetGenerator → Solver pipeline instead of pubgrub's DependencyProvider trait. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(resolver): replace ComposerVersion(u16) with semver::Version(u64)nsfisis
ComposerVersion used u16 segments (max 65535), causing overflow for PHP extensions like ext-dom (version 20031129). The extension became invisible to the resolver, failing create-project with "depends on ext-dom" errors. Use mozart_semver::Version (u64 segments) directly as pubgrub's version type, eliminating the overflow and redundant conversion layer. Also fixes Ord for patch pre-releases (patch1 > stable) and adds Display impl required by pubgrub. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22refactor: reorganize crates to match Composer subpackage structurensfisis
Rename mozart-constraint to mozart-semver (mirrors composer/semver) and extract mozart-class-map-generator from mozart-autoload (mirrors composer/class-map-generator). No logic changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(constraint): handle single pipe OR separator in version constraintsnsfisis
Composer uses `|` (single pipe) as the standard OR separator, but split_or() only recognized `||` (double pipe). This caused disjunctive constraints like `^6.0|^7.0|^8.0` to be parsed as only `^6.0`, breaking dependency resolution for packages like laravel/tinker. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(install): fall back to update when composer.lock is missingnsfisis
Match Composer behavior: instead of failing with an error when no composer.lock is present, show a warning and delegate to the update command to resolve dependencies from composer.json. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(resolver): replace __root__ with actual package name in error messagesnsfisis
Composer never shows the internal __root__ identifier to users. Add root_name field to ResolveRequest so the resolver can substitute the real package name (e.g. "laravel/laravel") in pubgrub error reports. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22fix(platform): detect PHP version from runtime instead of hardcoding 8.1nsfisis
PlatformConfig::new() was hardcoded to PHP 8.1 with a fixed extension list, causing resolution failures for packages requiring newer PHP (e.g. Laravel 12 requires >=8.2). Now calls detect_platform() to discover the actual PHP version, extensions and capabilities. Also adds a mutex to composer_home_dir tests to prevent env-var races. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22chore: cargo fmtnsfisis
2026-02-22refactor(http): centralize User-Agent string in mozart-corensfisis
Add mozart_core::http::user_agent() that returns a consistent "Mozart/<version> (<os>; <arch>)" string. Replace all scattered user-agent definitions across mozart-registry and mozart CLI commands. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22chore: remove some of #[ignore] attributesnsfisis
2026-02-22feat(init): add interactive dependency selection via Packagist searchnsfisis
Replace the TODO placeholders with a full interactive search-and-pick loop for both require and require-dev dependencies during `init`. Users can search Packagist, pick packages by number or name, and version constraints are auto-detected from available versions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22feat(repository): implement repository command with all actionsnsfisis
Extract shared helpers (composer_home, read/write_json_file, add/remove_repository, render_value) from config.rs into config_helpers.rs module. Implement all 7 repository actions: list, add, remove, set-url, get-url, disable, enable with --append/--before/--after positioning support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22chore: remove unused filesnsfisis
2026-02-22feat(spdx): add mozart-spdx-licenses crate for SPDX license validationnsfisis
Add new workspace crate that validates SPDX license expressions using data from composer/spdx-licenses (git submodule). Includes build.rs codegen from JSON, recursive descent expression parser supporting AND/OR/WITH/LicenseRef, and integrates into mozart-core's validate_license function. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22feat(metadata-minifier): add mozart-metadata-minifier cratensfisis
Port composer/metadata-minifier to Rust as an independent workspace crate. Implements expand() and minify() for Packagist's delta-encoded version metadata. Update mozart-registry to use the new crate for transparent minified response handling, and add __unset sentinel support to PackagistVersion deserialization. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22feat(deps): update dependenciesnsfisis
2026-02-22refactor(async): migrate from blocking HTTP to async/await with tokionsfisis
Replace reqwest::blocking with async reqwest across the entire codebase. All command execute functions, registry API calls (packagist, downloader, resolver, lockfile), and the main entry point now use async/await with the tokio runtime. The pubgrub resolver runs on spawn_blocking since its DependencyProvider trait is synchronous, using Handle::block_on for async I/O within that context. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22feat(tracing): add performance profiling via tracing cratensfisis
Wire up the existing --profile flag with tracing-subscriber to emit span timings on stderr. Supports MOZART_LOG env var override and verbose-level-aware filtering. No subscriber is installed when --profile is off, keeping tracing macros zero-cost. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22refactor(workspace): split monolithic crate into 6 workspace cratesnsfisis
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>
2026-02-21feat(completion): add shell completion generation via clap_completensfisis
Add a `completion` subcommand that generates shell completion scripts for Bash, Zsh, Fish, Elvish, and PowerShell using the clap_complete crate. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21ci: add GitHub Actions workflow for fmt, clippy, and testnsfisis
Runs on push/PR to main with Rust nightly toolchain, submodule checkout, and Swatinem/rust-cache for build caching. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21feat(console): add structured error handling, verbosity, and suggestionsnsfisis
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>
2026-02-21test(constraint): add comprehensive unit tests for version parsing and matchingnsfisis
Add ~136 tests across 7 categories: version parsing edge cases, version ordering, constraint parsing, constraint matching, internal functions, Composer behavioral compatibility, and divergence investigation. One test (double equals) is #[ignore]d due to == operator not being supported. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>