@ -82,6 +82,10 @@ class MultiConflictRule extends Rule
return false;
}
/**
* @return never
* @throws \RuntimeException
*/
public function disable()
{
throw new \RuntimeException("Disabling multi conflict rules is not possible. Please contact composer at https://github.com/composer/composer to let us debug what lead to this situation.");
* @param Rule $rule A rule which is a reason for this problem
* @return void
*/
public function addRule(Rule $rule)
{
@ -56,7 +59,7 @@ class Problem
/**
* Retrieve all reasons for this problem
*
* @return array The problem's reasons
* @return array<int,array<int,Rule>> The problem's reasons
*/
public function getReasons()
{
@ -66,7 +69,9 @@ class Problem
/**
* A human readable textual representation of the problem's reasons
*
* @param array $installedMap A map of all present packages
* @param bool $isVerbose
* @param array<int|string,BasePackage> $installedMap A map of all present packages
* @param array<Rule[]> $learnedPool
* @return string
*/
public function getPrettyString(RepositorySet $repositorySet, Request $request, Pool $pool, $isVerbose, array $installedMap = array(), array $learnedPool = array())
@ -101,8 +106,13 @@ class Problem
}
/**
* @internal
* @param Rule[] $rules
* @param string $indent
* @param bool $isVerbose
* @param array<int|string,BasePackage> $installedMap A map of all present packages
* @param array<Rule[]> $learnedPool
* @return string
* @internal
*/
public static function formatDeduplicatedRules($rules, $indent, RepositorySet $repositorySet, Request $request, Pool $pool, $isVerbose, array $installedMap = array(), array $learnedPool = array())
{
@ -166,7 +176,6 @@ class Problem
*
* @param string $id A canonical identifier for the reason
* @param Rule $reason The reason descriptor
*
* @return void
*/
protected function addReason($id, Rule $reason)
@ -190,9 +199,11 @@ class Problem
/**
* @internal
* @param bool $isVerbose
* @param string $packageName
* @return array{0: string, 1: string}
*/
public static function getMissingPackageReason(RepositorySet $repositorySet, Request $request, Pool $pool, $isVerbose, $packageName, $constraint = null)
public static function getMissingPackageReason(RepositorySet $repositorySet, Request $request, Pool $pool, $isVerbose, $packageName, ConstraintInterface $constraint = null)