1
0
Fork 0

Merge branch '1.9'

pull/8390/head
Jordi Boggiano 2019-10-25 14:17:35 +02:00
commit eea4098f98
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
2 changed files with 7 additions and 3 deletions

View File

@ -11,7 +11,8 @@
}, },
"type": { "type": {
"description": "Package type, either 'library' for common packages, 'composer-plugin' for plugins, 'metapackage' for empty packages, or a custom type ([a-z0-9-]+) defined by whatever project this package applies to.", "description": "Package type, either 'library' for common packages, 'composer-plugin' for plugins, 'metapackage' for empty packages, or a custom type ([a-z0-9-]+) defined by whatever project this package applies to.",
"type": "string" "type": "string",
"pattern": "^[a-z0-9-]+$"
}, },
"target-dir": { "target-dir": {
"description": "DEPRECATED: Forces the package to be installed into the given subdirectory path. This is used for autoloading PSR-0 packages that do not contain their full path. Use forward slashes for cross-platform compatibility.", "description": "DEPRECATED: Forces the package to be installed into the given subdirectory path. This is used for autoloading PSR-0 packages that do not contain their full path. Use forward slashes for cross-platform compatibility.",
@ -39,7 +40,8 @@
}, },
"version": { "version": {
"type": "string", "type": "string",
"description": "Package version, see https://getcomposer.org/doc/04-schema.md#version for more info on valid schemes." "description": "Package version, see https://getcomposer.org/doc/04-schema.md#version for more info on valid schemes.",
"pattern": "^v?\\d+(((\\.\\d+)?\\.\\d+)?\\.\\d+)?"
}, },
"time": { "time": {
"type": "string", "type": "string",

View File

@ -100,7 +100,9 @@ EOT
return 1; return 1;
} }
if (!is_readable($this->file)) { // check for readability by reading the file as is_readable can not be trusted on network-mounts
// see https://github.com/composer/composer/issues/8231 and https://bugs.php.net/bug.php?id=68926
if (!is_readable($this->file) && false === Silencer::call('file_get_contents', $this->file)) {
$io->writeError('<error>'.$this->file.' is not readable.</error>'); $io->writeError('<error>'.$this->file.' is not readable.</error>');
return 1; return 1;