Allow unstable for PECL downloads

This commit is contained in:
crazywhalecc 2026-03-17 12:57:43 +08:00
parent 25bec6b974
commit 22c5403e98
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ class PECL implements DownloadTypeInterface, CheckUpdateInterface
$versions = [];
logger()->debug('Matched ' . count($matches['version']) . " releases for {$name} from PECL");
foreach ($matches['version'] as $i => $version) {
if ($matches['state'][$i] !== 'stable') {
if ($matches['state'][$i] !== 'stable' && ($config['prefer-stable'] ?? true) === true) {
continue;
}
$versions[$version] = $peclName . '-' . $version . '.tgz';

View File

@ -91,7 +91,7 @@ class ConfigValidator
'bitbuckettag' => [['repo'], ['extract']],
'local' => [['dirname'], ['extract']],
'pie' => [['repo'], ['extract']],
'pecl' => [['name'], ['extract']],
'pecl' => [['name'], ['extract', 'prefer-stable']],
'php-release' => [['domain'], ['extract']],
'custom' => [[], ['func']],
];