| Age | Commit message (Collapse) | Author |
|
Add 18 missing config keys to config_value_type() including cache-read-only
(was in defaults but unmanageable), audit.* dotted keys, and bool-or-enum
keys like store-auths and bump-after-update. Implement --absolute flag to
resolve *-dir values to absolute paths. Fix render_value() to JSON-encode
arrays and use lowercase "null", matching Composer output.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Emit Composer-compatible stderr messages indicating which source is used
(lock file, vendor dir, or fallback). Detect empty installed.json and
fall back to the lock file with a warning instead of silently succeeding.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Composer-compatible output
Add value_parser for --format to enable shell completion with valid formats.
Parse @stability suffix (e.g. 1.0@beta) from version constraints before
resolution. Align output messages with Composer: "Searching for the specified
package.", match reporting, and split "Created:" across stderr/stdout.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
launch
Replace simple prefix check in is_valid_url with url::Url::parse() for
structural validation (e.g. "https://" with no host now correctly
rejected). Update Windows open_browser to use `start "web" explorer`
matching Composer's HomeCommand behavior.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Validate license input against SPDX identifiers, also accepting
"proprietary". Interactive mode re-prompts on invalid input;
non-interactive mode exits with an error. Fall back to
COMPOSER_DEFAULT_LICENSE env var when no --license flag is given.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Strip constraint suffixes (`:^2.0`, `=2.0`, ` ^2.0`) from filter args
and replace exact matching with glob pattern matching (`psr/*`) to match
Composer's BumpCommand behavior.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
platform
Remove hardcoded early-return that always marked lib-*, composer-plugin-api,
and composer-runtime-api as Missing. These packages now go through the normal
platform lookup, matching Composer's behavior.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Composer returns exit code 1 and writes to stderr when no packages
match the reinstall patterns. Mozart was returning 0 with a stdout
message, which could mislead CI pipelines into thinking the command
succeeded.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Composer errors when more than one of --major-only, --minor-only, or
--patch-only is specified. Mozart was silently giving --major-only
precedence. Now both show and outdated commands validate mutual
exclusivity with the same error message as Composer.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Composer defaults to "fail" for the --abandoned flag, causing a
non-zero exit code when abandoned packages are detected. Mozart
was defaulting to "report", which only printed warnings.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Composer's JsonFile::encode uses JSON_PRETTY_PRINT with 4-space indent.
Mozart was using serde_json::to_string_pretty which defaults to 2-space.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Composer outputs JSON with 4-space indentation. Mozart was using
serde_json::to_string_pretty which defaults to 2-space. Switch to
a custom PrettyFormatter with explicit 4-space indent.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
- "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>
|
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
The install command succeeds with a warning when no lock file exists,
rather than failing with a suggestion to run update.
|
|
|
|
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>
|
|
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>
|
|
- --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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
|
|
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>
|
|
|
|
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>
|
|
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>
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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 ~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>
|
|
Add 23 integration tests using assert_cmd and predicates covering
about, validate, show, licenses, install, config, init, and
dump-autoload commands with shared test helpers and fixture projects.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|