Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Intervals.php

function Intervals::get

Creates an array of numeric intervals and branch constraints representing a given constraint

if the returned numeric array is empty it means the constraint matches nothing in the numeric range (0 - +inf) if the returned branches array is empty it means no dev-* versions are matched if a constraint matches all possible dev-* versions, branches will contain Interval::anyDev()

@phpstan-return array{'numeric': Interval[], 'branches': array{'names': string[], 'exclude': bool}}

Return value

array

4 calls to Intervals::get()
IgnoreListPlatformRequirementFilter::filterConstraint in vendor/composer/composer/src/Composer/Filter/PlatformRequirementFilter/IgnoreListPlatformRequirementFilter.php
Intervals::generateIntervals in vendor/composer/semver/src/Intervals.php
@phpstan-return array{'numeric': Interval[], 'branches': array{'names': string[], 'exclude': bool}}
Intervals::isSubsetOf in vendor/composer/semver/src/Intervals.php
Checks whether $candidate is a subset of $constraint
VersionBumper::bumpRequirement in vendor/composer/composer/src/Composer/Package/Version/VersionBumper.php
Given a constraint, this returns a new constraint with the lower bound bumped to match the given package's version.

File

vendor/composer/semver/src/Intervals.php, line 272

Class

Intervals
Helper class generating intervals from constraints

Namespace

Composer\Semver

Code

public static function get(ConstraintInterface $constraint) {
    $key = (string) $constraint;
    if (!isset(self::$intervalsCache[$key])) {
        self::$intervalsCache[$key] = self::generateIntervals($constraint);
    }
    return self::$intervalsCache[$key];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal