mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-09 01:45:36 +08:00
string interpolation
This commit is contained in:
@@ -26,7 +26,8 @@ class Downloader
|
|||||||
public static function getPECLInfo(string $name, array $source): array
|
public static function getPECLInfo(string $name, array $source): array
|
||||||
{
|
{
|
||||||
$package = $source['pecl'] ?? (str_starts_with($name, 'ext-') ? substr($name, 4) : $name);
|
$package = $source['pecl'] ?? (str_starts_with($name, 'ext-') ? substr($name, 4) : $name);
|
||||||
$api_url = "https://pecl.php.net/rest/r/" . strtolower($package) . '/allreleases.xml';
|
$lp = strtolower($package);
|
||||||
|
$api_url = "https://pecl.php.net/rest/r/{$lp}/allreleases.xml";
|
||||||
logger()->debug("Fetching {$name} source from PECL: {$api_url}");
|
logger()->debug("Fetching {$name} source from PECL: {$api_url}");
|
||||||
$xml = self::curlExec(
|
$xml = self::curlExec(
|
||||||
url: $api_url,
|
url: $api_url,
|
||||||
|
|||||||
Reference in New Issue
Block a user