Properties

$policy

$policy : 

Type

$pool

$pool : 

Type

$rules

$rules : 

Type

$jobs

$jobs : 

Type

$installedMap

$installedMap : 

Type

$whitelistedMap

$whitelistedMap : 

Type

$addedMap

$addedMap : 

Type

$conflictAddedMap

$conflictAddedMap : 

Type

$addedPackages

$addedPackages : 

Type

$addedPackagesByNames

$addedPackagesByNames : 

Type

Methods

getRulesFor()

getRulesFor(  $jobs,   $installedMap,   $ignorePlatformReqs = false) 

Parameters

$jobs
$installedMap
$ignorePlatformReqs

createRequireRule()

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.

Parameters

\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

Returns

\Composer\DependencyResolver\Rule

The generated rule or null if tautological

createInstallOneOfRule()

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.

Parameters

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

Returns

\Composer\DependencyResolver\Rule

The generated rule

createRemoveRule()

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).

Parameters

\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

Returns

\Composer\DependencyResolver\Rule

The generated rule

createRule2Literals()

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.

Parameters

\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

Returns

\Composer\DependencyResolver\Rule

The generated rule

addRulesForPackage()

addRulesForPackage(\Composer\Package\PackageInterface  $package,   $ignorePlatformReqs) 

Parameters

\Composer\Package\PackageInterface $package
$ignorePlatformReqs

addConflictRules()

addConflictRules() 

obsoleteImpossibleForAlias()

obsoleteImpossibleForAlias(  $package,   $provider) 

Parameters

$package
$provider

whitelistFromJobs()

whitelistFromJobs() 

addRulesForJobs()

addRulesForJobs(  $ignorePlatformReqs) 

Parameters

$ignorePlatformReqs

addRule()

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.

Parameters

integer $type

A TYPE_* constant defining the rule type

\Composer\DependencyResolver\Rule $newRule

The rule about to be added