Copied!

Helper class to evaluate constraint by compiling and reusing the code to evaluate

CloneableInstantiable
Methods
public static clear()
 

Clears the memoization cache once you are done

  • return void
public static match(Composer\Semver\Constraint\ConstraintInterface $constraint, $operator, $version)
 

Evaluates the expression: $constraint match $operator $version

  • param \ConstraintInterface $constraint
  • param int $operator
  • phpstan-param Constraint::OP_* $operator
  • param string $version
  • return bool
Properties
private static $compiledCheckerCache = []
 
  • var array
  • phpstan-var array<string, callable>
private static $enabled = NULL
 
  • var bool
private static $resultCache = []
 
  • var array
  • phpstan-var array<string, bool>
private static $transOpInt = ['==', '<', '<=', '>', '>=', '!=']
 
  • phpstan-var array<Constraint::OP_, Constraint::STR_OP_>
Properties
private static $compiledCheckerCache = []
 
  • var array
  • phpstan-var array<string, callable>
private static $enabled = NULL
 
  • var bool
private static $resultCache = []
 
  • var array
  • phpstan-var array<string, bool>
private static $transOpInt = ['==', '<', '<=', '>', '>=', '!=']
 
  • phpstan-var array<Constraint::OP_, Constraint::STR_OP_>
Methods
public static clear()
 

Clears the memoization cache once you are done

  • return void
public static match(Composer\Semver\Constraint\ConstraintInterface $constraint, $operator, $version)
 

Evaluates the expression: $constraint match $operator $version

  • param \ConstraintInterface $constraint
  • param int $operator
  • phpstan-param Constraint::OP_* $operator
  • param string $version
  • return bool
© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration