//! ref: composer/src/Composer/Installer/InstallerInterface.php
use crate::package::PackageInterface;
use crate::repository::InstalledRepositoryInterface;
use shirabe_php_shim::PhpMixed;
#[async_trait::async_trait(?Send)]
pub trait InstallerInterface: std::fmt::Debug {
fn supports(&self, package_type: &str) -> bool;
fn is_installed(
&self,
repo: &dyn InstalledRepositoryInterface,
package: &dyn PackageInterface,
) -> bool;
async fn download(
&self,
package: &dyn PackageInterface,
prev_package: Option<&dyn PackageInterface>,
) -> anyhow::Result