Drop irrelevant properties from composer_commit-ref.json
parent
f3dc31839f
commit
279b5f0156
|
@ -117,6 +117,7 @@ class ConfigValidator
|
|||
// check for require-dev overrides
|
||||
if (isset($manifest['require']) && isset($manifest['require-dev'])) {
|
||||
$requireOverrides = array_intersect_key($manifest['require'], $manifest['require-dev']);
|
||||
|
||||
if (!empty($requireOverrides)) {
|
||||
$plural = (count($requireOverrides) > 1) ? 'are' : 'is';
|
||||
$warnings[] = implode(', ', array_keys($requireOverrides)). " {$plural} required both in require and require-dev, this can lead to unexpected behavior";
|
||||
|
@ -124,7 +125,9 @@ class ConfigValidator
|
|||
}
|
||||
|
||||
// check for commit references
|
||||
$packages = array_merge($manifest['require'], $manifest['require-dev']);
|
||||
$require = isset($manifest['require']) ? $manifest['require'] : array();
|
||||
$requireDev = isset($manifest['require-dev']) ? $manifest['require-dev'] : array();
|
||||
$packages = array_merge($require, $requireDev);
|
||||
foreach ($packages as $package => $version) {
|
||||
if (preg_match('/#/', $version) === 1) {
|
||||
$warnings[] = sprintf(
|
||||
|
|
|
@ -1,55 +1,5 @@
|
|||
{
|
||||
"name": "composer/commit-ref-validation",
|
||||
"description": "Dummy file to test the commit-ref validation",
|
||||
"keywords": ["package", "dependency", "autoload"],
|
||||
"homepage": "https://getcomposer.org/",
|
||||
"type": "library",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nils Adermann",
|
||||
"email": "naderman@naderman.de",
|
||||
"homepage": "http://www.naderman.de"
|
||||
},
|
||||
{
|
||||
"name": "Jordi Boggiano",
|
||||
"email": "j.boggiano@seld.be",
|
||||
"homepage": "http://seld.be"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"irc": "irc://irc.freenode.org/composer",
|
||||
"issues": "https://github.com/composer/composer/issues"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.2",
|
||||
"some/package": "dev-master#fgb42d"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.5"
|
||||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "5.3.3"
|
||||
}
|
||||
},
|
||||
"suggest": {
|
||||
"ext-zip": "Enabling the zip extension allows you to unzip archives, and allows gzip compression of all internet traffic",
|
||||
"ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": { "Composer": "src/" }
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-0": { "Composer\\Test": "tests/" }
|
||||
},
|
||||
"bin": ["bin/composer"],
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"test": "phpunit"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue