Skip to content

Commit 3228856

Browse files
committed
fixes #5271 - added detection for Windows 10
1 parent 8c0bd6b commit 3228856

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

Parser/OperatingSystem.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ class OperatingSystem extends ParserAbstract
8686
'UBT' => 'Ubuntu',
8787
'WTV' => 'WebTV',
8888
'WIN' => 'Windows',
89+
'W10' => 'Windows 10',
8990
'W2K' => 'Windows 2000',
9091
'W31' => 'Windows 3.1',
9192
'WI7' => 'Windows 7',
@@ -136,7 +137,7 @@ class OperatingSystem extends ParserAbstract
136137
'Symbian' => array('SYM', 'SYS', 'SY3', 'S60', 'S40'),
137138
'Unix' => array('SOS', 'AIX', 'HPX', 'BSD', 'NBS', 'OBS', 'DFB', 'SYL', 'IRI', 'T64', 'INF'),
138139
'WebTV' => array('WTV'),
139-
'Windows' => array('WI7', 'WI8', 'W81', 'WVI', 'WS3', 'WXP', 'W2K', 'WNT', 'WME', 'W98', 'W95', 'WRT', 'W31', 'WIN'),
140+
'Windows' => array('W10', 'WI7', 'WI8', 'W81', 'WVI', 'WS3', 'WXP', 'W2K', 'WNT', 'WME', 'W98', 'W95', 'WRT', 'W31', 'WIN'),
140141
'Windows Mobile' => array('WPH', 'WMO', 'WCE')
141142
);
142143

Tests/Parser/fixtures/oss.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,12 @@
254254
name: Windows
255255
short_name: WIN
256256
version:
257+
-
258+
user_agent: Mozilla/5.0 (Windows NT 6.4; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko
259+
os:
260+
name: Windows 10
261+
short_name: W10
262+
version: 10
257263
-
258264
user_agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20
259265
os:

regexes/oss.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,15 @@
122122
##########
123123
# Windows
124124
##########
125+
- regex: 'CYGWIN_NT-6.4|Windows NT 6.4|Windows 10'
126+
name: 'Windows 10'
127+
version: '10'
128+
125129
- regex: 'CYGWIN_NT-6.3|Windows NT 6.3|Windows 8.1'
126130
name: 'Windows 8.1'
127131
version: '8.1'
128-
129-
132+
133+
130134
- regex: 'CYGWIN_NT-6.2|Windows NT 6.2|Windows 8'
131135
name: 'Windows 8'
132136
version: '8'

0 commit comments

Comments
 (0)