You are here

class MissingProjectInfo in Automatic Updates 7

Missing project info checker.

Hierarchy

Expanded class hierarchy of MissingProjectInfo

1 string reference to 'MissingProjectInfo'
ReadinessCheckerManager::getCheckers in ReadinessCheckers/ReadinessCheckerManager.php
Get checkers.

File

ReadinessCheckers/MissingProjectInfo.php, line 6

View source
class MissingProjectInfo implements ReadinessCheckerInterface {
  use IgnoredPathsTrait;
  use ProjectInfoTrait;

  /**
   * {@inheritdoc}
   */
  public static function run() {
    return static::missingProjectInfoCheck();
  }

  /**
   * Check for projects missing project info.
   *
   * @return array
   *   An array of translatable strings if any checks fail.
   */
  protected static function missingProjectInfoCheck() {
    $messages = [];
    foreach (static::getInfos() as $extension_name => $info) {
      if (static::isIgnoredPath($info['install path'])) {
        continue;
      }
      if (!$info['version']) {
        $messages[] = t('The project "@extension" can not be updated because its version is either undefined or a dev release.', [
          '@extension' => $info['name'],
        ]);
      }
    }
    return $messages;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
IgnoredPathsTrait::isIgnoredPath protected static function Check if the file path is ignored.
MissingProjectInfo::missingProjectInfoCheck protected static function Check for projects missing project info.
MissingProjectInfo::run public static function Run check. Overrides ReadinessCheckerInterface::run
ProjectInfoTrait::getExtensionVersion protected static function Get the extension version.
ProjectInfoTrait::getInfos protected static function Returns an array of info files information of available extensions.
ProjectInfoTrait::getProjectName protected static function Get the extension's project name.