-
Notifications
You must be signed in to change notification settings - Fork 495
OS family added to operating system parse result #6850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OS family added to operating system parse result #6850
Conversation
I don't have a strong opinion either way, but wouldn't it be good to have this consistent with the browser family? This is how I fetch the data on https://devicedetector.lw1.at/ |
I need to use I'm writing facade for device detector in my project as Symfony bundle and have construction like:
So I need to inject or just statically call OperationSystem::getOsFamily PR's target to save DeviceDetector class as only entrypoint to the component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not against these changes
I myself also output os.family and browser.family in node-device-detector
these changes will not affect the overall working code either in matomo or anywhere else.
@sgiehl merge at your discretion
Of course I can make changes for Browser parser too. |
It's fine to simply add it to this PR |
@sgiehl @sanchezzzhak But I haven't added family to tests fixtures.
I don't like that, but for now left as is. If you like I can add new browser_full.yaml file with full response structure for some user agents and write separate test or test method for that case without unsets and deprecate current realization. In future it is possible to migrate all user agents to full scheme but there is a lot of 'monkey work' to add short_name and family to almost 500 cases |
to the current file
|
Added browser family to browser.yaml cases |
Description:
Title: OS family added to Operating system parse result
Problem:
There are some use cases when operating system family is needed. Actual DeviceDetector class has no ability to get operating system family directly. I this case I need to inject OperatingSystem parser to my services and it is not good.
Resolution:
Review