Fix lib-curl-openssl parsing for SecureTransport (#11534)
On macOS, if libcurl is built against SecureTransport, the platform repository will contain an invalid package name: % composer show --platform | grep curl ext-curl 8.2.7 The curl PHP extension lib-curl 8.1.2 The curl library lib-curl-(securetransport) openssl 3.1.1 curl (securetransport) openss... lib-curl-libssh2 1.11.0 curl libssh2 version lib-curl-zlib 1.2.11 curl zlib version This change fixes it: % bin/composer show --platform | grep curl lib-curl 8.1.2 The curl library lib-curl-libssh2 1.11.0 curl libssh2 version lib-curl-securetransport 3.1.1 curl (securetransport) openssl ... lib-curl-zlib 1.2.11 curl zlib version (second column width difference comes from the Composer dev version number)pull/11920/head
parent
b29be2f56b
commit
008c8ed11a
|
@ -238,7 +238,12 @@ class PlatformRepository extends ArrayRepository
|
||||||
$parsedVersion = Version::parseOpenssl($sslMatches['version'], $isFips);
|
$parsedVersion = Version::parseOpenssl($sslMatches['version'], $isFips);
|
||||||
$this->addLibrary($name.'-openssl'.($isFips ? '-fips' : ''), $parsedVersion, 'curl OpenSSL version ('.$parsedVersion.')', array(), $isFips ? array('curl-openssl') : array());
|
$this->addLibrary($name.'-openssl'.($isFips ? '-fips' : ''), $parsedVersion, 'curl OpenSSL version ('.$parsedVersion.')', array(), $isFips ? array('curl-openssl') : array());
|
||||||
} else {
|
} else {
|
||||||
$this->addLibrary($name.'-'.$library, $sslMatches['version'], 'curl '.$library.' version ('.$sslMatches['version'].')', array('curl-openssl'));
|
if ($library === '(securetransport) openssl') {
|
||||||
|
$shortlib = 'securetransport';
|
||||||
|
} else {
|
||||||
|
$shortlib = $library;
|
||||||
|
}
|
||||||
|
$this->addLibrary($name.'-'.$shortlib, $sslMatches['version'], 'curl '.$library.' version ('.$sslMatches['version'].')', array('curl-openssl'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -376,7 +376,6 @@ libSSH Version => libssh2/1.4.1',
|
||||||
'curl: libssh not libssh2' => array(
|
'curl: libssh not libssh2' => array(
|
||||||
'curl',
|
'curl',
|
||||||
'
|
'
|
||||||
|
|
||||||
curl
|
curl
|
||||||
|
|
||||||
cURL support => enabled
|
cURL support => enabled
|
||||||
|
|
Loading…
Reference in New Issue