1
0
Fork 0

Fix minimum-stability validation to match what VersionParser::normalizeStability does, closes #9904

pull/9911/head
Jordi Boggiano 2021-05-21 15:00:48 +02:00
parent 16279d328e
commit 7d19930ca6
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 1 additions and 1 deletions

View File

@ -276,7 +276,7 @@ class ValidatingArrayLoader implements LoaderInterface
}
if ($this->validateString('minimum-stability') && !empty($this->config['minimum-stability'])) {
if (!isset(BasePackage::$stabilities[$this->config['minimum-stability']])) {
if (!isset(BasePackage::$stabilities[strtolower($this->config['minimum-stability'])]) && $this->config['minimum-stability'] !== 'RC') {
$this->errors[] = 'minimum-stability : invalid value ('.$this->config['minimum-stability'].'), must be one of '.implode(', ', array_keys(BasePackage::$stabilities));
unset($this->config['minimum-stability']);
}