$policy
$policy :
__construct(\Composer\DependencyResolver\PolicyInterface $policy, \Composer\DependencyResolver\Pool $pool)
\Composer\DependencyResolver\PolicyInterface | $policy | |
\Composer\DependencyResolver\Pool | $pool |
createRequireRule(\Composer\Package\PackageInterface $package, array $providers, integer $reason, mixed $reasonData = null) : \Composer\DependencyResolver\Rule
Creates a new rule for the requirements of a package
This rule is of the form (-A|B|C), where B and C are the providers of one requirement of the package A.
\Composer\Package\PackageInterface | $package | The package with a requirement |
array | $providers | The providers of the requirement |
integer | $reason | A RULE_* constant describing the reason for generating this rule |
mixed | $reasonData | Any data, e.g. the requirement name, that goes with the reason |
The generated rule or null if tautological
createInstallOneOfRule(array $packages, integer $reason, array $job) : \Composer\DependencyResolver\Rule
Creates a rule to install at least one of a set of packages
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.
array | $packages | The set of packages to choose from |
integer | $reason | A RULE_* constant describing the reason for generating this rule |
array | $job | The job this rule was created from |
The generated rule
createRemoveRule(\Composer\Package\PackageInterface $package, integer $reason, array $job) : \Composer\DependencyResolver\Rule
Creates a rule to remove a package
The rule for a package A is (-A).
\Composer\Package\PackageInterface | $package | The package to be removed |
integer | $reason | A RULE_* constant describing the reason for generating this rule |
array | $job | The job this rule was created from |
The generated rule
createRule2Literals(\Composer\Package\PackageInterface $issuer, \Composer\Package\PackageInterface $provider, integer $reason, mixed $reasonData = null) : \Composer\DependencyResolver\Rule
Creates a rule for two conflicting packages
The rule for conflicting packages A and B is (-A|-B). A is called the issuer and B the provider.
\Composer\Package\PackageInterface | $issuer | The package declaring the conflict |
\Composer\Package\PackageInterface | $provider | The package causing the conflict |
integer | $reason | A RULE_* constant describing the reason for generating this rule |
mixed | $reasonData | Any data, e.g. the package name, that goes with the reason |
The generated rule
whitelistFromPackage(\Composer\Package\PackageInterface $package)
\Composer\Package\PackageInterface | $package |
addRulesForPackage(\Composer\Package\PackageInterface $package, $ignorePlatformReqs)
\Composer\Package\PackageInterface | $package | |
$ignorePlatformReqs |
addRule(integer $type, \Composer\DependencyResolver\Rule $newRule = null)
Adds a rule unless it duplicates an existing one of any type
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.
integer | $type | A TYPE_* constant defining the rule type |
\Composer\DependencyResolver\Rule | $newRule | The rule about to be added |