1
0
Fork 0

Finalize new autoloader-suffix config value, refs #2524, fixes #1413

pull/2522/merge
Jordi Boggiano 2013-12-26 17:40:52 +01:00
parent d4b7548cd9
commit f85a366eb9
4 changed files with 8 additions and 10 deletions

View File

@ -659,6 +659,8 @@ The following options are supported:
* **prepend-autoloader:** Defaults to `true`. If false, the composer autoloader * **prepend-autoloader:** Defaults to `true`. If false, the composer autoloader
will not be prepended to existing autoloaders. This is sometimes required to fix will not be prepended to existing autoloaders. This is sometimes required to fix
interoperability issues with other autoloaders. interoperability issues with other autoloaders.
* **autoloader-suffix:** Defaults to `null`. String to be used as a suffix for
the generated Composer autoloader. When null a random one will be generated.
* **github-domains:** Defaults to `["github.com"]`. A list of domains to use in * **github-domains:** Defaults to `["github.com"]`. A list of domains to use in
github mode. This is used for GitHub Enterprise setups. github mode. This is used for GitHub Enterprise setups.
* **notify-on-install:** Defaults to `true`. Composer allows repositories to * **notify-on-install:** Defaults to `true`. Composer allows repositories to

View File

@ -178,7 +178,7 @@
}, },
"autoloader-suffix": { "autoloader-suffix": {
"type": "string", "type": "string",
"description": "Optional string to be used as a suffix to the autoloader generator. When null a random one will be generated." "description": "Optional string to be used as a suffix for the generated Composer autoloader. When null a random one will be generated."
}, },
"prepend-autoloader": { "prepend-autoloader": {
"type": "boolean", "type": "boolean",

View File

@ -254,18 +254,12 @@ EOT
// handle config values // handle config values
$uniqueConfigValues = array( $uniqueConfigValues = array(
'process-timeout' => array('is_numeric', 'intval'), 'process-timeout' => array('is_numeric', 'intval'),
'use-include-path' => array( 'use-include-path' => array($booleanValidator, $booleanNormalizer),
$booleanValidator,
$booleanNormalizer
),
'preferred-install' => array( 'preferred-install' => array(
function ($val) { return in_array($val, array('auto', 'source', 'dist'), true); }, function ($val) { return in_array($val, array('auto', 'source', 'dist'), true); },
function ($val) { return $val; } function ($val) { return $val; }
), ),
'notify-on-install' => array( 'notify-on-install' => array($booleanValidator, $booleanNormalizer),
$booleanValidator,
$booleanNormalizer
),
'vendor-dir' => array('is_string', function ($val) { return $val; }), 'vendor-dir' => array('is_string', function ($val) { return $val; }),
'bin-dir' => array('is_string', function ($val) { return $val; }), 'bin-dir' => array('is_string', function ($val) { return $val; }),
'cache-dir' => array('is_string', function ($val) { return $val; }), 'cache-dir' => array('is_string', function ($val) { return $val; }),
@ -288,6 +282,8 @@ EOT
return $val !== 'false' && (bool) $val; return $val !== 'false' && (bool) $val;
} }
), ),
'autoloader-suffix' => array('is_string', function ($val) { return $val === 'null' ? null : $val; }),
'prepend-autoloader' => array($booleanValidator, $booleanNormalizer),
); );
$multiConfigValues = array( $multiConfigValues = array(
'github-protocols' => array( 'github-protocols' => array(

View File

@ -35,7 +35,7 @@ class Config
'cache-files-ttl' => null, // fallback to cache-ttl 'cache-files-ttl' => null, // fallback to cache-ttl
'cache-files-maxsize' => '300MiB', 'cache-files-maxsize' => '300MiB',
'discard-changes' => false, 'discard-changes' => false,
'autoload-suffix' => null, 'autoloader-suffix' => null,
'prepend-autoloader' => true, 'prepend-autoloader' => true,
'github-domains' => array('github.com'), 'github-domains' => array('github.com'),
); );