0 follower

Class Yiisoft\YiiDevTool\Infrastructure\Composer\ComposerInstallation

InheritanceYiisoft\YiiDevTool\Infrastructure\Composer\ComposerInstallation

Method Details

Hide inherited methods

__construct() public method

public __construct( Yiisoft\YiiDevTool\Infrastructure\Composer\ComposerPackage $rootPackage ): mixed
$rootPackage Yiisoft\YiiDevTool\Infrastructure\Composer\ComposerPackage

                public function __construct(private ComposerPackage $rootPackage)
{
    $this->analyzeDependencies();
}

            
getDependencyPackages() public method

public getDependencyPackages( string $section ): Yiisoft\YiiDevTool\Infrastructure\Composer\ComposerPackage[]
$section string

                public function getDependencyPackages(string $section): array
{
    ComposerConfig::validateDependencySection($section);
    $rootPackage = $this->rootPackage;
    $dependencies = $this->rootPackage
        ->getComposerConfig()
        ->getDependencyList($section)
        ->getDependencies();
    $packages = [];
    foreach ($dependencies as $dependency) {
        if ($dependency->getPackageName() === 'roave/security-advisories') {
            // Skip special case because this is a virtual package
            continue;
        }
        if ($dependency->isPlatformRequirement()) {
            // Skip platform requirements
            continue;
        }
        $packageName = $dependency->getPackageName();
        $packages[] = new ComposerPackage($packageName, "{$rootPackage->getPath()}/vendor/{$packageName}");
    }
    return $packages;
}

            
getInstalledDependencyPackages() public method

public getInstalledDependencyPackages( ): Yiisoft\YiiDevTool\Infrastructure\Composer\ComposerPackage[]

                public function getInstalledDependencyPackages(): array
{
    return $this->installedDependencies;
}

            
getNotInstalledDependencyPackages() public method

public getNotInstalledDependencyPackages( ): Yiisoft\YiiDevTool\Infrastructure\Composer\ComposerPackage[]

                public function getNotInstalledDependencyPackages(): array
{
    return $this->notInstalledDependencies;
}

            
hasNotInstalledDependencyPackages() public method

public hasNotInstalledDependencyPackages( ): boolean

                public function hasNotInstalledDependencyPackages(): bool
{
    return count($this->notInstalledDependencies) > 0;
}