Documentation

RuleSetGenerator
in package

Tags
author

Nils Adermann naderman@naderman.de

Table of Contents

$addedMap  : mixed
$addedPackages  : mixed
$addedPackagesByNames  : mixed
$allowListedMap  : mixed
$conflictAddedMap  : mixed
$installedMap  : mixed
$jobs  : mixed
$policy  : mixed
$pool  : mixed
$rules  : mixed
__construct()  : mixed
getRulesFor()  : mixed
addConflictRules()  : mixed
addRulesForJobs()  : mixed
addRulesForPackage()  : mixed
allowListFromJobs()  : mixed
allowListFromPackage()  : mixed
createInstallOneOfRule()  : Rule
Creates a rule to install at least one of a set of packages
createRemoveRule()  : Rule
Creates a rule to remove a package
createRequireRule()  : Rule|null
Creates a new rule for the requirements of a package
createRule2Literals()  : Rule|null
Creates a rule for two conflicting packages
obsoleteImpossibleForAlias()  : mixed
whitelistFromJobs()  : mixed
whitelistFromPackage()  : mixed
addRule()  : mixed
Adds a rule unless it duplicates an existing one of any type

Properties

Methods

getRulesFor()

public getRulesFor(mixed $jobs, mixed $installedMap[, mixed $ignorePlatformReqs = false ]) : mixed
Parameters
$jobs : mixed
$installedMap : mixed
$ignorePlatformReqs : mixed = false
Return values
mixed

addConflictRules()

protected addConflictRules([mixed $ignorePlatformReqs = false ]) : mixed
Parameters
$ignorePlatformReqs : mixed = false
Return values
mixed

addRulesForJobs()

protected addRulesForJobs(mixed $ignorePlatformReqs) : mixed
Parameters
$ignorePlatformReqs : mixed
Return values
mixed

allowListFromJobs()

protected allowListFromJobs() : mixed
Return values
mixed

createInstallOneOfRule()

Creates a rule to install at least one of a set of packages

protected createInstallOneOfRule(array<string|int, mixed> $packages, int $reason, array<string|int, mixed> $job) : Rule

The rule is (A|B|C) with A, B and C different packages. If the given set of packages is empty an impossible rule is generated.

Parameters
$packages : array<string|int, mixed>

The set of packages to choose from

$reason : int

A RULE_* constant describing the reason for generating this rule

$job : array<string|int, mixed>

The job this rule was created from

Return values
Rule

The generated rule

createRemoveRule()

Creates a rule to remove a package

protected createRemoveRule(PackageInterface $package, int $reason, array<string|int, mixed> $job) : Rule

The rule for a package A is (-A).

Parameters
$package : PackageInterface

The package to be removed

$reason : int

A RULE_* constant describing the reason for generating this rule

$job : array<string|int, mixed>

The job this rule was created from

Return values
Rule

The generated rule

createRequireRule()

Creates a new rule for the requirements of a package

protected createRequireRule(PackageInterface $package, array<string|int, mixed> $providers, int $reason[, mixed $reasonData = null ]) : Rule|null

This rule is of the form (-A|B|C), where B and C are the providers of one requirement of the package A.

Parameters
$package : PackageInterface

The package with a requirement

$providers : array<string|int, mixed>

The providers of the requirement

$reason : int

A RULE_* constant describing the reason for generating this rule

$reasonData : mixed = null

Any data, e.g. the requirement name, that goes with the reason

Return values
Rule|null

The generated rule or null if tautological

createRule2Literals()

Creates a rule for two conflicting packages

protected createRule2Literals(PackageInterface $issuer, PackageInterface $provider, int $reason[, mixed $reasonData = null ]) : Rule|null

The rule for conflicting packages A and B is (-A|-B). A is called the issuer and B the provider.

Parameters
$issuer : PackageInterface

The package declaring the conflict

$provider : PackageInterface

The package causing the conflict

$reason : int

A RULE_* constant describing the reason for generating this rule

$reasonData : mixed = null

Any data, e.g. the package name, that goes with the reason

Return values
Rule|null

The generated rule

obsoleteImpossibleForAlias()

protected obsoleteImpossibleForAlias(mixed $package, mixed $provider) : mixed
Parameters
$package : mixed
$provider : mixed
Return values
mixed

whitelistFromJobs()

protected whitelistFromJobs() : mixed
Tags
deprecated

use allowListFromJobs instead

Return values
mixed

addRule()

Adds a rule unless it duplicates an existing one of any type

private addRule(int $type[, Rule $newRule = null ]) : mixed

To be able to directly pass in the result of one of the rule creation methods null is allowed which will not insert a rule.

Parameters
$type : int

A TYPE_* constant defining the rule type

$newRule : Rule = null

The rule about to be added

Return values
mixed

Search results