pub enum ComposerCommand {
Show 15 variants
Install {
working_dir: Option<PathBuf>,
no_dev: bool,
frozen: bool,
lock_verify: bool,
ignore_platform_reqs: bool,
ignore_platform_req: Vec<String>,
scripts: bool,
no_scripts: bool,
patches: bool,
no_patches: bool,
},
Update {
packages: Vec<String>,
no_install: bool,
with_dependencies: bool,
with_all_dependencies: bool,
working_dir: Option<PathBuf>,
no_dev: bool,
resolution: ResolutionStrategy,
prefer_lowest: bool,
dry_run: bool,
ignore_platform_reqs: bool,
ignore_platform_req: Vec<String>,
},
Validate {
working_dir: Option<PathBuf>,
strict: bool,
no_check_lock: bool,
no_check_publish: bool,
no_check_all: bool,
with_dependencies: bool,
check_lock: bool,
},
DumpAutoloader {
optimize: bool,
classmap_authoritative: bool,
no_dev: bool,
apcu_autoloader: bool,
apcu_prefix: Option<String>,
autoloader_suffix: Option<String>,
working_dir: Option<PathBuf>,
},
Require {
packages: Vec<String>,
dev: bool,
no_update: bool,
no_install: bool,
with_dependencies: bool,
with_all_dependencies: bool,
prefer_lowest: bool,
ignore_platform_reqs: bool,
ignore_platform_req: Vec<String>,
working_dir: Option<PathBuf>,
dry_run: bool,
},
Remove {
packages: Vec<String>,
dev: bool,
no_update: bool,
no_install: bool,
no_dev: bool,
ignore_platform_reqs: bool,
ignore_platform_req: Vec<String>,
working_dir: Option<PathBuf>,
dry_run: bool,
},
Show {
package: Option<String>,
tree: bool,
direct: bool,
platform: bool,
self_: bool,
name_only: bool,
path: bool,
latest: bool,
outdated: bool,
no_dev: bool,
working_dir: Option<PathBuf>,
},
Why {
package: String,
recursive: bool,
tree: bool,
working_dir: Option<PathBuf>,
},
WhyNot {
package: String,
version: Option<String>,
recursive: bool,
tree: bool,
working_dir: Option<PathBuf>,
},
Outdated {
packages: Vec<String>,
direct: bool,
major_only: bool,
minor_only: bool,
patch_only: bool,
no_dev: bool,
strict: bool,
working_dir: Option<PathBuf>,
},
Audit {
no_dev: bool,
abandoned: AbandonedHandling,
locked: bool,
working_dir: Option<PathBuf>,
},
Licenses {
no_dev: bool,
working_dir: Option<PathBuf>,
},
Status {
working_dir: Option<PathBuf>,
},
Fund {
no_dev: bool,
working_dir: Option<PathBuf>,
},
External(Vec<OsString>),
}Variants§
Install
Install vendor/ from composer.lock
Reads composer.json + composer.lock in the working directory,
content-hash-verifies the lock, parallel-downloads dists into
vendor/, and emits vendor/autoload.php
Fields
frozen: boolFail if composer.lock is out of sync with composer.json. Currently a no-op — the install already errors on content-hash mismatch by default
lock_verify: boolVerify the lock is internally consistent (content-hash,
requires, transitives) and exit. Doesn’t touch vendor/
or run the autoloader. CI-friendly read-only check
ignore_platform_reqs: boolIgnore all platform requirements (php, ext-, lib-). bougie does not enforce platform requirements yet
Update
Update dependencies and composer.lock
Re-resolve the dependency graph, write a fresh composer.lock,
and install the result into vendor/. With no packages the whole
graph re-resolves; naming packages does a partial update, leaving
every other locked package pinned. --no-install stops after
writing the lock; --dry-run previews without writing. Aliased to
upgrade / u
Fields
packages: Vec<String>Packages to update (vendor/name). When given, only these
packages re-resolve; every other package stays pinned to its
composer.lock version. With no packages, the whole graph
re-resolves from scratch
with_all_dependencies: boolAlso update all of the named packages’ dependencies, including
ones shared with other packages (-W)
resolution: ResolutionStrategyVersion-preference policy when resolving
prefer_lowest: boolPrefer the lowest matching versions. Equivalent to
--resolution lowest; when set it overrides --resolution
dry_run: boolResolve and print the solution without writing
composer.lock or touching vendor/. Without this flag,
update writes a fresh composer.lock
Validate
Validate composer.json structure and contents
Fields
DumpAutoloader
Regenerate the autoloader files
Regenerate vendor/composer/autoload_*.php against the current
composer.lock. Aliased to dump-autoload
Fields
Emit the classmap-authoritative static loader
(--classmap-authoritative / -a). Implies --optimize
Require
Add packages to composer.json and install them
Add one or more packages to composer.json require (or
require-dev), re-resolve composer.lock, and install them. A
bare vendor/pkg resolves the latest stable and writes a caret
(^X.Y) constraint; set an explicit constraint with
vendor/pkg:^1.0, vendor/pkg=^1.0, or a trailing argument
(vendor/pkg ^1.0)
Fields
Remove
Remove packages and uninstall them from vendor/
Remove one or more packages from composer.json, re-resolve
composer.lock, and uninstall them from vendor/
Fields
Show
List installed packages, or show details for one
Reads the project’s composer.lock. Aliases info, list
Fields
Why
Show which packages depend on a given package
Shows why a package is installed. Alias depends
Fields
WhyNot
Show what prevents a package from being installed
Reports the conflicting requirements for a package, optionally at
a given version. Alias prohibits
Fields
Outdated
List installed packages with a newer version available
Use the global --format json for JSON output
Fields
Audit
Check installed packages for security advisories
Checks against the Packagist security-advisories database. Exits
non-zero when advisories are found. Use the global --format json
for JSON
Fields
abandoned: AbandonedHandlingHow to treat abandoned packages. Detection is not yet wired up
Licenses
List the license of every installed package
Use the global --format json for JSON
Fields
Status
Report packages that look locally modified
bougie installs from dist archives, so for the common case this reports “no local changes”
Fund
Show funding information for installed packages
Grouped by vendor. Use --format json for JSON
Fields
External(Vec<OsString>)
Catch-all for any composer subcommand bougie does not implement
natively (create-project, archive, bump, global, …). These
return an error pointing at bougie tool install composer/composer
Trait Implementations§
Source§impl Debug for ComposerCommand
impl Debug for ComposerCommand
Source§impl FromArgMatches for ComposerCommand
impl FromArgMatches for ComposerCommand
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for ComposerCommand
impl Subcommand for ComposerCommand
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand