1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 00:53:06 +00:00

Rules of type feature are no longer needed

This commit is contained in:
Nils Adermann 2012-04-27 18:28:18 +02:00
parent 69b55f12ae
commit 15f43571b9
4 changed files with 13 additions and 16 deletions

View file

@ -20,13 +20,11 @@ class RuleSet implements \IteratorAggregate, \Countable
// highest priority => lowest number
const TYPE_PACKAGE = 0;
const TYPE_JOB = 1;
const TYPE_FEATURE = 3;
const TYPE_LEARNED = 4;
protected static $types = array(
-1 => 'UNKNOWN',
self::TYPE_PACKAGE => 'PACKAGE',
self::TYPE_FEATURE => 'FEATURE',
self::TYPE_JOB => 'JOB',
self::TYPE_LEARNED => 'LEARNED',
);

View file

@ -427,7 +427,7 @@ class Solver
// push all of our rules (can only be feature or job rules)
// asserting this literal on the problem stack
foreach ($this->rules->getIteratorFor(array(RuleSet::TYPE_JOB, RuleSet::TYPE_FEATURE)) as $assertRule) {
foreach ($this->rules->getIteratorFor(RuleSet::TYPE_JOB) as $assertRule) {
if ($assertRule->isDisabled() || !$assertRule->isAssertion() || $assertRule->isWeak()) {
continue;
}