From 1078fadedd3e663dafbcc2c5dee0be6da12679ca Mon Sep 17 00:00:00 2001 From: Vitaly Baev Date: Sat, 8 Jul 2017 03:35:31 +0300 Subject: [PATCH 1/2] Yandex Browser detection --- src/Agent.php | 2 ++ tests/AgentTest.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Agent.php b/src/Agent.php index 7158b9c..e105f25 100644 --- a/src/Agent.php +++ b/src/Agent.php @@ -44,6 +44,7 @@ class Agent extends Mobile_Detect 'Opera' => 'Opera|OPR', 'Edge' => 'Edge', 'UCBrowser' => 'UCBrowser', + 'YandexBrowser' => 'YaBrowser', 'Vivaldi' => 'Vivaldi', 'Chrome' => 'Chrome', 'Firefox' => 'Firefox', @@ -74,6 +75,7 @@ class Agent extends Mobile_Detect 'IE' => ['IEMobile/[VER];', 'IEMobile [VER]', 'MSIE [VER];', 'rv:[VER]'], 'Edge' => 'Edge/[VER]', 'Vivaldi' => 'Vivaldi/[VER]', + 'YandexBrowser' => 'YaBrowser/[VER]', ]; /** diff --git a/tests/AgentTest.php b/tests/AgentTest.php index ec9b46e..086a153 100644 --- a/tests/AgentTest.php +++ b/tests/AgentTest.php @@ -28,6 +28,7 @@ class AgentTest extends TestCase 'Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25' => 'Safari', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36 Vivaldi/1.2.490.43' => 'Vivaldi', 'Mozilla/5.0 (Linux; U; Android 4.0.4; en-US; LT28h Build/6.1.E.3.7) AppleWebKit/534.31 (KHTML, like Gecko) UCBrowser/9.2.2.323 U3/0.8.0 Mobile Safari/534.31' => 'UCBrowser', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 YaBrowser/17.3.0.1896 Yowser/2.5 Safari/537.36' => 'YandexBrowser', ]; private $robots = [ @@ -63,6 +64,7 @@ class AgentTest extends TestCase 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; de) Opera 11.51' => '11.51', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12' => '12', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36 Vivaldi/1.2.490.43' => '1.2.490.43', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 YaBrowser/17.3.0.1896 Yowser/2.5 Safari/537.36' => '17.3.0.1896', ]; private $operatingSystemVersions = [ From df004f4c27bf4690a0522fb1907a587cbae1f040 Mon Sep 17 00:00:00 2001 From: Vitaly Baev Date: Tue, 1 May 2018 15:07:50 +0300 Subject: [PATCH 2/2] Changed dist to trusty in Travis --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 27c939b..acd860a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ language: php +dist: trusty + php: - 5.4 - 5.5