From b3c395b8d24bbabe789ccdb441f029ec00f9a4b5 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 1 Jun 2012 14:05:24 +0200 Subject: [PATCH] Add PHP info to UA string --- src/Composer/Util/RemoteFilesystem.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Composer/Util/RemoteFilesystem.php b/src/Composer/Util/RemoteFilesystem.php index 4275e4539..32d84e1b5 100644 --- a/src/Composer/Util/RemoteFilesystem.php +++ b/src/Composer/Util/RemoteFilesystem.php @@ -214,7 +214,15 @@ class RemoteFilesystem protected function getOptionsForUrl($originUrl) { - $options['http']['header'] = sprintf("User-Agent: Composer/%s (%s; %s)\r\n", Composer::VERSION, php_uname('s'), php_uname('r')); + $options['http']['header'] = sprintf( + "User-Agent: Composer/%s (%s; %s; PHP %s.%s.%s)\r\n", + Composer::VERSION, + php_uname('s'), + php_uname('r'), + PHP_MAJOR_VERSION, + PHP_MINOR_VERSION, + PHP_RELEASE_VERSION + ); if (extension_loaded('zlib')) { $options['http']['header'] .= 'Accept-Encoding: gzip'."\r\n"; }