pub enum ComposerCommand {
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,
},
Update {
packages: Vec<String>,
with_dependencies: bool,
with_all_dependencies: bool,
working_dir: Option<PathBuf>,
no_dev: 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>,
},
External(Vec<OsString>),
}Variants§
Install
Install a project’s 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
working_dir: Option<PathBuf>Run the install in this directory instead of CWD.
Mirrors Composer’s --working-dir / -d.
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. Accepted for parity with Composer’s CI usage.
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-). Accepted for Composer parity; bougie does not enforce platform requirements yet.
Update
Resolve the project’s dependency graph and write a fresh
composer.lock. With no package arguments this re-resolves from
scratch (ignoring any existing lock); naming one or more packages
does a partial update — only those packages re-resolve while every
other locked package stays pinned. Pass --dry-run to preview the
solution without writing the lock or touching vendor/.
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 (Composer’s partial update). With no
packages, the whole graph re-resolves from scratch.
with_dependencies: boolAlso update the named packages’ dependencies (Composer’s
--with-dependencies / -w).
with_all_dependencies: boolAlso update all of the named packages’ dependencies, including
ones shared with other packages (Composer’s
--with-all-dependencies / -W).
working_dir: Option<PathBuf>Run the update in this directory instead of CWD.
Mirrors Composer’s --working-dir / -d.
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 vendor/composer/autoload_*.php against the current
composer.lock. Drop-in for composer dump-autoload; output
is byte-equivalent to Composer 2.8.12 with the same flags. Aliased
to dump-autoload for users coming from Composer muscle-memory.
Fields
Emit the classmap-authoritative static loader
(--classmap-authoritative / -a). Implies --optimize.
External(Vec<OsString>)
Any other composer subcommand (require, remove, show, why,
outdated, audit, create-project, …) is forwarded verbatim to
the project’s pinned Composer phar and run with the project’s PHP,
conf.d, and vendor/bin on PATH. Only install, update,
validate, and dump-autoload(er) are reimplemented natively;
everything else is the real 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