Browse Source

Normalize OS labels

Jordi Boggiano 5 years ago
parent
commit
33fe7e733c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Packagist/WebBundle/Util/UserAgentParser.php

+ 1 - 1
src/Packagist/WebBundle/Util/UserAgentParser.php

@@ -23,7 +23,7 @@ class UserAgentParser
             }
             }
             $this->composerVersion = preg_replace('{\+[a-f0-9]{40}}', '', $matches['composer']);
             $this->composerVersion = preg_replace('{\+[a-f0-9]{40}}', '', $matches['composer']);
             $this->phpVersion = $matches['php'];
             $this->phpVersion = $matches['php'];
-            $this->os = preg_replace('{^cygwin_nt-.*}', 'cygwin', $matches['os']);
+            $this->os = preg_replace('{^cygwin_nt-.*}', 'cygwin', strtolower($matches['os']));
             $this->httpVersion = $matches['http'] ?? null;
             $this->httpVersion = $matches['http'] ?? null;
             $this->ci = (bool) ($matches['ci'] ?? null);
             $this->ci = (bool) ($matches['ci'] ?? null);
         }
         }