Fix problem report when requiring "ext-zend opcache", refs #2509
parent
5a1765c838
commit
471b012e3a
|
@ -108,6 +108,10 @@ class Problem
|
|||
|
||||
// handle php extensions
|
||||
if (0 === stripos($job['packageName'], 'ext-')) {
|
||||
if (false !== strpos($job['packageName'], ' ')) {
|
||||
return "\n - The requested PHP extension ".$job['packageName'].' should be required as '.str_replace(' ', '-', $job['packageName']).'.';
|
||||
}
|
||||
|
||||
$ext = substr($job['packageName'], 4);
|
||||
$error = extension_loaded($ext) ? 'has the wrong version ('.(phpversion($ext) ?: '0').') installed' : 'is missing from your system';
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ use Composer\Util\Silencer;
|
|||
*/
|
||||
class PlatformRepository extends ArrayRepository
|
||||
{
|
||||
const PLATFORM_PACKAGE_REGEX = '{^(?:php(?:-64bit|-ipv6|-zts|-debug)?|hhvm|(?:ext|lib)-[^/]+)$}i';
|
||||
const PLATFORM_PACKAGE_REGEX = '{^(?:php(?:-64bit|-ipv6|-zts|-debug)?|hhvm|(?:ext|lib)-[^/ ]+)$}i';
|
||||
|
||||
private $versionParser;
|
||||
|
||||
|
|
Loading…
Reference in New Issue