Class Yiisoft\YiiDevTool\Infrastructure\Composer\ComposerInstallation
| Inheritance | Yiisoft\YiiDevTool\Infrastructure\Composer\ComposerInstallation |
|---|
Public Methods
Method Details
| public mixed __construct ( Yiisoft\YiiDevTool\Infrastructure\Composer\ComposerPackage $rootPackage ) | ||
| $rootPackage | Yiisoft\YiiDevTool\Infrastructure\Composer\ComposerPackage | |
public function __construct(private ComposerPackage $rootPackage)
{
$this->analyzeDependencies();
}
| public Yiisoft\YiiDevTool\Infrastructure\Composer\ComposerPackage[] getDependencyPackages ( string $section ) | ||
| $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;
}
| public Yiisoft\YiiDevTool\Infrastructure\Composer\ComposerPackage[] getInstalledDependencyPackages ( ) |
public function getInstalledDependencyPackages(): array
{
return $this->installedDependencies;
}
| public Yiisoft\YiiDevTool\Infrastructure\Composer\ComposerPackage[] getNotInstalledDependencyPackages ( ) |
public function getNotInstalledDependencyPackages(): array
{
return $this->notInstalledDependencies;
}
| public boolean hasNotInstalledDependencyPackages ( ) |
public function hasNotInstalledDependencyPackages(): bool
{
return count($this->notInstalledDependencies) > 0;
}
Signup or Login in order to comment.