viv rm

Edits composer.json to remove a dependency, resolves the rest of the dependency graph and installs it, minus the package you removed. --no-install/--no-update opt out of the install or the resolve.

Usage

Remove a dependency from composer.json, resolve the rest and install (`--no-install`/`--no-update` opt out)

Usage: viv rm [OPTIONS] <PACKAGES>...

Arguments:
  <PACKAGES>...  `vendor/package`, one or more

Options:
      --dev                          Remove from `require-dev` instead of `require`
  -v, --verbose                      Raise logging to debug
      --cache-dir <CACHE_DIR>        Store location (default `$XDG_CACHE_HOME/vivace`, or `~/.cache/vivace`)
      --no-update                    Edit `composer.json` only; don't resolve, touch `composer.lock`, or install (implies `--no-install`, matching `composer remove`)
      --no-normalize                 Deprecated, no-op (#145): `rm` always normalizes `composer.json` now, same as `install`/`dump-autoload` since 0.6
      --offline                      Fail fast on any request instead of connecting: install errors, naming every package not already in the store; update solves from cached repository metadata only, erroring on an uncached package. Also set by `COMPOSER_DISABLE_NETWORK` (any value but unset, empty or `0`; Composer's own git-priming `prime` value is not special-cased here, since neither `install` nor `update` touch a git source)
  -d, --project-dir <PROJECT_DIR>    Project directory holding `composer.json` [default: .]
      --no-scripts                   Skip `pre-update-cmd`/`post-update-cmd` and every other root `scripts` listener, including the chained install's own `pre-autoload-dump`/`post-autoload-dump`
      --no-plugins                   Passed straight through to the chained install (`docs/plugin-strategy.md`)
      --no-install                   Skip the install step after writing `composer.lock` (`composer remove --no-install`): today's `viv rm` behaviour
      --ignore-platform-reqs         Ignore every platform (`php`/`ext-*`/`lib-*`) requirement in the partial update's solve and in the chained install's platform check, as Composer's flag does (#242)
      --ignore-platform-req <REQ>    Ignore one named platform requirement (`*` glob, repeatable) in the solve and in the chained install's platform check (#242)
      --no-blocking                  Allows installing a version a known security advisory covers or a package Packagist marks abandoned, instead of blocking it by default (#175, `audit.block-insecure`/`audit.block-abandoned`). Also settable via `COMPOSER_NO_SECURITY_BLOCKING=1`
      --metadata-ttl <METADATA_TTL>  Seconds a cached `/p2/` provider file may be served without revalidating it (#191). `0` (the default) always revalidates, matching today's behaviour. Also settable via `VIV_METADATA_TTL` (this flag wins); `--offline` always wins over either
  -h, --help                         Print help

Reads and writes

  • Reads: composer.json, composer.lock, the store under $XDG_CACHE_HOME/vivace.
  • Writes: composer.json, composer.lock, and, unless --no-install, vendor/ and the store.

Exit codes

Same as viv add: 0 success, 1 a filesystem/network error or bad flag, 2 the solver found no solution for the remaining requirements.

See also

viv add, viv update