1
0
Fork 0

Merge pull request #6281 from swumao/master

Add config>platform checking
pull/6284/head
Jordi Boggiano 2017-03-21 08:13:00 +01:00 committed by GitHub
commit 4a6013d0f4
1 changed files with 10 additions and 0 deletions

View File

@ -64,6 +64,16 @@ class ValidatingArrayLoader implements LoaderInterface
} }
} }
if (!empty($this->config['config']['platform'])) {
foreach ((array)$this->config['config']['platform'] as $key=>$platform) {
try {
$this->versionParser->normalize($platform);
} catch (\Exception $e) {
$this->errors[] = 'config.platform.' . $key . ' : invalid value ('.$platform.'): '.$e->getMessage();
}
}
}
$this->validateRegex('type', '[A-Za-z0-9-]+'); $this->validateRegex('type', '[A-Za-z0-9-]+');
$this->validateString('target-dir'); $this->validateString('target-dir');
$this->validateArray('extra'); $this->validateArray('extra');