Ignore self references when anlaysing independent root requirements
When creating a transaction we try to identify all requirements that are not themselves required by any other package. If a package references itself this should not mark it as being required by another package.pull/4989/head
parent
7b404c4717
commit
4af74b54e0
|
@ -165,10 +165,12 @@ class Transaction
|
||||||
$possibleRequires = $this->pool->whatProvides($link->getTarget(), $link->getConstraint());
|
$possibleRequires = $this->pool->whatProvides($link->getTarget(), $link->getConstraint());
|
||||||
|
|
||||||
foreach ($possibleRequires as $require) {
|
foreach ($possibleRequires as $require) {
|
||||||
|
if ($require !== $package) {
|
||||||
unset($roots[$require->id]);
|
unset($roots[$require->id]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $roots;
|
return $roots;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,10 +23,7 @@ Circular dependencies are possible between packages
|
||||||
{
|
{
|
||||||
"name": "regular/pkg",
|
"name": "regular/pkg",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"source": { "reference": "some.branch", "type": "git", "url": "" },
|
"source": { "reference": "some.branch", "type": "git", "url": "" }
|
||||||
"__dummy__require": {
|
|
||||||
"require/itself": "1.0.0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue