You are here

public function PackageManager::needsComposerUpdate in Composer Manager 8

Returns whether a composer update is needed.

An update is needed when there are packages that are: 1. Required, but not installed. 2. Installed, but no longer required.

Return value

bool True if a composer update is needed, false otherwise.

Overrides PackageManagerInterface::needsComposerUpdate

File

src/PackageManager.php, line 189

Class

PackageManager
Manages composer packages.

Namespace

Drupal\composer_manager

Code

public function needsComposerUpdate() {
  $needs_update = FALSE;
  foreach ($this
    ->getRequiredPackages() as $package) {
    if (empty($package['version']) || empty($package['required_by'])) {
      $needs_update = TRUE;
      break;
    }
  }
  return $needs_update;
}