Merge pull request #4097 from alcohol/allow-unicode-keywords
Allow unicode keywords, fixes #4087pull/3186/merge
commit
22369266e4
|
@ -70,7 +70,7 @@ class ValidatingArrayLoader implements LoaderInterface
|
||||||
$this->validateArray('scripts'); // TODO validate event names & listener syntax
|
$this->validateArray('scripts'); // TODO validate event names & listener syntax
|
||||||
$this->validateString('description');
|
$this->validateString('description');
|
||||||
$this->validateUrl('homepage');
|
$this->validateUrl('homepage');
|
||||||
$this->validateFlatArray('keywords', '[A-Za-z0-9 ._-]+');
|
$this->validateFlatArray('keywords', '[\p{N}\p{L} ._-]+');
|
||||||
|
|
||||||
if (isset($this->config['license'])) {
|
if (isset($this->config['license'])) {
|
||||||
if (is_string($this->config['license'])) {
|
if (is_string($this->config['license'])) {
|
||||||
|
|
|
@ -47,7 +47,7 @@ class ValidatingArrayLoaderTest extends \PHPUnit_Framework_TestCase
|
||||||
'description' => 'Foo bar',
|
'description' => 'Foo bar',
|
||||||
'version' => '1.0.0',
|
'version' => '1.0.0',
|
||||||
'type' => 'library',
|
'type' => 'library',
|
||||||
'keywords' => array('a', 'b_c', 'D E'),
|
'keywords' => array('a', 'b_c', 'D E', 'éîüø', '微信'),
|
||||||
'homepage' => 'https://foo.com',
|
'homepage' => 'https://foo.com',
|
||||||
'time' => '2010-10-10T10:10:10+00:00',
|
'time' => '2010-10-10T10:10:10+00:00',
|
||||||
'license' => 'MIT',
|
'license' => 'MIT',
|
||||||
|
|
Loading…
Reference in New Issue