1
0
Fork 0

Allow php_uname to be disabled, fixes composer/getcomposer.org#112

pull/6432/merge
Jordi Boggiano 2017-05-21 16:24:35 +02:00
parent 9ae434cefe
commit d0e780a8eb
2 changed files with 3 additions and 3 deletions

View File

@ -159,7 +159,7 @@ class Application extends BaseApplication
Composer::VERSION,
Composer::RELEASE_DATE,
defined('HHVM_VERSION') ? 'HHVM '.HHVM_VERSION : 'PHP '.PHP_VERSION,
php_uname('s') . ' / ' . php_uname('r')
function_exists('php_uname') ? php_uname('s') . ' / ' . php_uname('r') : 'Unknown OS'
), true, IOInterface::DEBUG);
if (PHP_VERSION_ID < 50302) {

View File

@ -143,8 +143,8 @@ final class StreamContextFactory
$options['http']['header'][] = sprintf(
'User-Agent: Composer/%s (%s; %s; %s%s)',
Composer::VERSION === '@package_version@' ? 'source' : Composer::VERSION,
php_uname('s'),
php_uname('r'),
function_exists('php_uname') ? php_uname('s') : 'Unknown',
function_exists('php_uname') ? php_uname('r') : 'Unknown',
$phpVersion,
getenv('CI') ? '; CI' : ''
);