Skip to content

Commit

Permalink
Merge pull request #61 from donatj/RemoveOperaNextSupport
Browse files Browse the repository at this point in the history
Drops explicit Opera Next support
  • Loading branch information
donatj authored Jan 21, 2020
2 parents a419f06 + c51ab7d commit 283e581
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/UserAgentParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function parse_user_agent( $u_agent = null ) {
$browser = $result['browser'][$key];
$version = $result['version'][$key];
} elseif( $find('OPR', $key) ) {
$browser = 'Opera Next';
$browser = 'Opera';
$version = $result['version'][$key];
} elseif( $find('Opera', $key, $browser) ) {
$find('Version', $key);
Expand Down
25 changes: 15 additions & 10 deletions tests/user_agents.json
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,21 @@
"browser": "Opera",
"version": "11.61"
},
"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/28.0.1500.20 Safari\/537.36 OPR\/15.0.1147.18 (Edition Next)": {
"platform": "Macintosh",
"browser": "Opera",
"version": "15.0.1147.18"
},
"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/30.0.1599.66 Safari\/537.36 OPR\/17.0.1241.36 (Edition Next)": {
"platform": "Macintosh",
"browser": "Opera",
"version": "17.0.1241.36"
},
"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/79.0.3945.117 Safari\/537.36 OPR\/66.0.3515.36": {
"platform": "Macintosh",
"browser": "Opera",
"version": "66.0.3515.36"
},
"Mozilla\/4.0 (compatible; MSIE 8.0; Windows NT 6.1; de) Opera 11.01": {
"platform": "Windows",
"browser": "Opera",
Expand All @@ -354,16 +369,6 @@
"browser": "Opera",
"version": "11.10"
},
"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/28.0.1500.20 Safari\/537.36 OPR\/15.0.1147.18 (Edition Next)": {
"platform": "Macintosh",
"browser": "Opera Next",
"version": "15.0.1147.18"
},
"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/30.0.1599.66 Safari\/537.36 OPR\/17.0.1241.36 (Edition Next)": {
"platform": "Macintosh",
"browser": "Opera Next",
"version": "17.0.1241.36"
},
"Mozilla\/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit\/531.22.7 (KHTML, like Gecko) Version\/4.0.5 Safari\/531.22.7": {
"platform": "Macintosh",
"browser": "Safari",
Expand Down

0 comments on commit 283e581

Please sign in to comment.