string interpolation

This commit is contained in:
henderkes
2026-03-26 12:20:53 +07:00
parent a8e50276d9
commit cc59b39a02

View File

@@ -26,7 +26,8 @@ class Downloader
public static function getPECLInfo(string $name, array $source): array
{
$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}");
$xml = self::curlExec(
url: $api_url,