You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat!: extend browser, OS, device and in-app detection (#11)
BREAKING CHANGE: `isMac()` no longer returns `true` for iOS or iPadOS.
Use the new `isiOS()` method instead. `deviceType()` now returns `TV`,
`Console`, and `Wearable` in addition to the existing values.
New browser detection:
- isBrave(), isVivaldi(), isSamsungBrowser(), isArc(), isDuckDuckGo()
New OS detection:
- isiOS() (split from isMac), isChromeOS(), isHarmonyOS()
New device type detection:
- isTV(), isConsole(), isWearable()
Expanded in-app detection:
- Facebook, Instagram, TikTok, Snapchat, LinkedIn, Telegram, Line,
Pinterest (in addition to existing WebView, Twitter, WeChat)
Also fixes pre-existing issues:
- iPadOS was not matched by any OS flag
- Samsung Internet was misidentified as Chrome
- Smart TVs, consoles, wearables all defaulted to Desktop
- deviceType() used stringly-typed magic dispatch
- parseVersion() produced dead version string overwritten downstream
- skipBotDetection() called on every request instead of once
- IE match used overly broad 'ie' substring (now word-boundary)
- detectIsInApp() re-fetched agent from payload unnecessarily
Copy file name to clipboardExpand all lines: README.md
+41-28Lines changed: 41 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,8 @@ A Laravel package to identify the visitor's browser, operating system, and devic
11
11
12
12
> **Fork notice:** This is a maintained fork of [hisorange/browser-detect](https://github.com/hisorange/browser-detect) by [Varga Zsolt](https://github.com/hisorange), which appears to be abandoned. Full credit to the original author for the design and initial implementation. This fork keeps the package compatible with modern PHP and Laravel versions.
13
13
14
+
> **Upgrading to 6.x?**`isMac()` no longer returns `true` for iOS — use the new `isiOS()` method instead. See [UPGRADING.md](UPGRADING.md) for all breaking changes.
15
+
14
16
## Requirements
15
17
16
18
- PHP 8.3+
@@ -45,7 +47,7 @@ if (Browser::isFirefox() || Browser::isOpera()) {
0 commit comments