ua-parser / uap-php

PHP implementation of ua-parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'Other' is not returned anymore after updating

csmeets opened this issue · comments

Hi,

We went from "ua-parser/uap-php": "^3.8, < 3.9" to: "ua-parser/uap-php": "^3.9",

With version 3.8 i had this check in our code

$parser = Parser::create();              
$result = $parser->parse($request->headers->get('User-Agent'));

return 1 == $request->request->get('mobile-view') || 'Other' !== $result->device->family;

With this version i could check for 'Other' in order to check if the user is working on a desktop or mobile

When i update to 3.9 the $result->device->family returns 'MAC' instead of other (in my case i am working on a mac)

That means that for every operating system it will return something else.

Is there something else i can check in order to check if the user is on mobile or on desktop?