diff --git a/doc/04-schema.md b/doc/04-schema.md index 3a250a418..56e787110 100644 --- a/doc/04-schema.md +++ b/doc/04-schema.md @@ -659,6 +659,8 @@ The following options are supported: * **prepend-autoloader:** Defaults to `true`. If false, the composer autoloader will not be prepended to existing autoloaders. This is sometimes required to fix 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 mode. This is used for GitHub Enterprise setups. * **notify-on-install:** Defaults to `true`. Composer allows repositories to diff --git a/res/composer-schema.json b/res/composer-schema.json index 180656c1d..827e41f5c 100644 --- a/res/composer-schema.json +++ b/res/composer-schema.json @@ -178,7 +178,7 @@ }, "autoloader-suffix": { "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": { "type": "boolean", diff --git a/src/Composer/Command/ConfigCommand.php b/src/Composer/Command/ConfigCommand.php index edc370a66..629cb7fec 100644 --- a/src/Composer/Command/ConfigCommand.php +++ b/src/Composer/Command/ConfigCommand.php @@ -254,18 +254,12 @@ EOT // handle config values $uniqueConfigValues = array( 'process-timeout' => array('is_numeric', 'intval'), - 'use-include-path' => array( - $booleanValidator, - $booleanNormalizer - ), + 'use-include-path' => array($booleanValidator, $booleanNormalizer), 'preferred-install' => array( function ($val) { return in_array($val, array('auto', 'source', 'dist'), true); }, function ($val) { return $val; } ), - 'notify-on-install' => array( - $booleanValidator, - $booleanNormalizer - ), + 'notify-on-install' => array($booleanValidator, $booleanNormalizer), 'vendor-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; }), @@ -288,6 +282,8 @@ EOT return $val !== 'false' && (bool) $val; } ), + 'autoloader-suffix' => array('is_string', function ($val) { return $val === 'null' ? null : $val; }), + 'prepend-autoloader' => array($booleanValidator, $booleanNormalizer), ); $multiConfigValues = array( 'github-protocols' => array( diff --git a/src/Composer/Config.php b/src/Composer/Config.php index 311c7de85..c54bc498c 100644 --- a/src/Composer/Config.php +++ b/src/Composer/Config.php @@ -35,7 +35,7 @@ class Config 'cache-files-ttl' => null, // fallback to cache-ttl 'cache-files-maxsize' => '300MiB', 'discard-changes' => false, - 'autoload-suffix' => null, + 'autoloader-suffix' => null, 'prepend-autoloader' => true, 'github-domains' => array('github.com'), );