From 7449162aa40ecf6ab37b9d9336e3fb9edf89ac0f Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 28 May 2013 18:15:04 +0200 Subject: [PATCH] Report ICU failures as the intl extension being missing, refs #1939 --- src/Composer/DependencyResolver/Problem.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Composer/DependencyResolver/Problem.php b/src/Composer/DependencyResolver/Problem.php index b0fbd4990..34374f6eb 100644 --- a/src/Composer/DependencyResolver/Problem.php +++ b/src/Composer/DependencyResolver/Problem.php @@ -90,9 +90,13 @@ class Problem // handle linked libs if (0 === stripos($job['packageName'], 'lib-')) { - $lib = substr($job['packageName'], 4); + if (strtolower($job['packageName']) === 'lib-icu') { + $error = extension_loaded('intl') ? 'has the wrong version installed, try upgrading the intl extension.' : 'is missing from your system, make sure the intl extension is loaded.'; - return "\n - The requested linked library ".$job['packageName'].$this->constraintToText($job['constraint']).' has the wrong version installed or is missing from your system, make sure to have the extension providing it.'; + return "\n - The requested linked library ".$job['packageName'].$this->constraintToText($job['constraint']).' '.$error; + } + + return "\n - The requested linked library ".$job['packageName'].$this->constraintToText($job['constraint']).' has the wrong version installed or is missing from your system, make sure to load the extension providing it.'; } if (!preg_match('{^[A-Za-z0-9_./-]+$}', $job['packageName'])) {