1
0
Fork 0

Print details about missing extensions, fixes #312

pull/473/merge
Jordi Boggiano 2012-03-18 22:45:22 +01:00
parent b12e73792c
commit 5fd50080ab
1 changed files with 6 additions and 0 deletions

View File

@ -75,6 +75,12 @@ class Problem
$job = $reason['job'];
if ($job && $job['cmd'] === 'install' && empty($job['packages'])) {
// handle php extensions
if (0 === stripos($job['packageName'], 'ext-')) {
$ext = substr($job['packageName'], 4);
$error = extension_loaded($ext) ? 'has the wrong version ('.phpversion($ext).') installed' : 'is missing from your system';
return 'The requested PHP extension "'.$job['packageName'].'" '.$this->constraintToText($job['constraint']).$error.'.';
}
return 'The requested package "'.$job['packageName'].'" '.$this->constraintToText($job['constraint']).'could not be found.';
}
}