pub struct Composer;Expand description
Composer package manager adapter.
Trait Implementations§
Source§impl PackageManager for Composer
impl PackageManager for Composer
Source§fn detect(&self, path: &Path) -> bool
fn detect(&self, path: &Path) -> bool
The manifest, not the lockfile: a project that has never installed still has a
composer.json, and reporting the manager it uses is useful before there is any
bloat to report.
Source§fn bloat_dirs(&self, path: &Path) -> Vec<BloatDir>
fn bloat_dirs(&self, path: &Path) -> Vec<BloatDir>
vendor/, but only when it is Composer’s own.
Bundler configured with bundle config set path vendor/bundle puts its gems
inside the same directory. Deleting vendor/ in such a repository would take
them with it under a proof that says nothing about them, and no
composer install puts them back. Rare enough to decline rather than model:
Bundler still claims vendor/bundle and prunes it under its own lockfile.
Source§fn enforce_lockfile(&self, path: &Path, policy: EnforcePolicy) -> Result<()>
fn enforce_lockfile(&self, path: &Path, policy: EnforcePolicy) -> Result<()>
composer validate is the read-only side: it writes nothing and fails when
composer.lock is no longer in sync with composer.json, which is exactly the
question a prune has to answer. --no-check-publish drops the “this package
could not be published” complaints (missing description, license) and
--no-check-all the constraint-style nags — neither has anything to do with
whether the lockfile can rebuild vendor/.
The write side is composer update --no-install, which re-resolves and writes
the lockfile without touching vendor/.
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Source§fn restore(&self, path: &Path, timeout: Duration) -> Result<()>
fn restore(&self, path: &Path, timeout: Duration) -> Result<()>
dev-prune restore). Read moreSource§fn lockfiles(&self) -> &'static [&'static str]
fn lockfiles(&self) -> &'static [&'static str]
Source§fn restore_named(
&self,
project_path: &Path,
dir_name: &str,
runtime: Option<&str>,
timeout: Duration,
) -> Result<()>
fn restore_named( &self, project_path: &Path, dir_name: &str, runtime: Option<&str>, timeout: Duration, ) -> Result<()>
PackageManager::restore, told the name the pruned directory had. Read moreSource§fn runtime_tag(&self, project_path: &Path, dir_name: &str) -> Option<String>
fn runtime_tag(&self, project_path: &Path, dir_name: &str) -> Option<String>
Auto Trait Implementations§
impl Freeze for Composer
impl RefUnwindSafe for Composer
impl Send for Composer
impl Sync for Composer
impl Unpin for Composer
impl UnsafeUnpin for Composer
impl UnwindSafe for Composer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more