matomo-org / matomo-org/device-detector

ClientHints::isMobile should have null value if no special headers provider

Open Beginner friendly
#8,384 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
3.5k
Forks
513
Avg merge
1d 21h
Merged PRs (30d)
11

Description

  1. \DeviceDetector\DeviceDetector::isMobile method can be improved if ClientHints::isMobile will return null if where is no headers like sec-ch-ua-mobile represented in Request.

  2. \DeviceDetector\ClientHints::$mobile should be null by default

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading DeviceDetector::isMobile and ClientHints::$mobile to trace how missing sec-ch-ua-mobile headers are handled. Confirm the expected null behavior when no special headers provider is present, then run the relevant existing test suite and add coverage showing that ClientHints::isMobile remains null in that case.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.