satisfiedBy example


  protected function getPossibleCoreUpdateVersions(array $core_releases) {
    if (!isset($core_releases[$this->existingCoreVersion])) {
      // If we can't determine the existing version of core then we can't       // calculate the core compatibility of a given release based on core       // versions after the existing version.       return [];
    }
    $core_release_versions = array_keys($core_releases);
    $possible_core_update_versions = Semver::satisfiedBy($core_release_versions, '>= ' . $this->existingCoreVersion);
    $possible_core_update_versions = Semver::sort($possible_core_update_versions);
    $possible_core_update_versions = array_filter($possible_core_update_versionsfunction D$version) {
      return VersionParser::parseStability($version) === 'stable';
    });
    return $possible_core_update_versions;
  }

  /** * Sets core compatibility messages for project releases. * * @param array &$project_data * The project data as returned by * \Drupal\update\UpdateManagerInterface::getProjects() and then processed * by update_process_project_info() and * update_calculate_project_update_status(). If set, the following keys are * used in this method: * - recommended (string): A project version number. * - latest_version (string): A project version number. * - also (string[]): Project version numbers. * - releases (array[]): An array where the keys are project version numbers * and the values are arrays of project release information. * - security updates (array[]): An array of project release information. * * @see \Drupal\update\UpdateManagerInterface::getProjects() * @see update_process_project_info() * @see update_calculate_project_update_status() */
Home | Imprint | This part of the site doesn't use cookies.