Skip to content

Commit

Permalink
Added clarifications for 4.8.x version.
Browse files Browse the repository at this point in the history
  • Loading branch information
serbanghita committed Oct 6, 2023
1 parent 1d6c816 commit dd87abc
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
![Build status](https://github.com/serbanghita/Mobile-Detect/workflows/Mobile-Detect/badge.svg)
![Latest version](https://img.shields.io/github/v/tag/serbanghita/Mobile-Detect?style=flat-square)
![4.8.x PHP8](https://img.shields.io/github/actions/workflow/status/serbanghita/Mobile-Detect/test.yml?branch=4.8.x&label=4.8.x%20PHP8&style=flat-square)
![3.74.x PHP7](https://img.shields.io/github/actions/workflow/status/serbanghita/Mobile-Detect/test.yml?branch=3.74.x&label=3.74.x%20PHP7&style=flat-square)
![2.8.x PHP5](https://img.shields.io/github/actions/workflow/status/serbanghita/Mobile-Detect/test.yml?branch=2.8.x&label=2.8.x%20PHP5&style=flat-square)
![Monthly Downloads](https://img.shields.io/packagist/dm/mobiledetect/mobiledetectlib?style=flat-square)
![Monthly Downloads](https://img.shields.io/packagist/dt/mobiledetect/mobiledetectlib?style=flat-square)
![MIT License](https://img.shields.io/packagist/l/mobiledetect/mobiledetectlib?style=flat-square)
Expand All @@ -20,6 +18,18 @@ it is not a replacement for CSS3 media queries or other forms of client-side fea
- Can detect the difference between a mobile phone and a table by using regexes.
- The **accuracy** and **relevance** of the detection is kept by running [tests](./tests) to check for detection conflicts.

## Before you install

There are three versions of MobileDetect.
`4.8.x` is the main version that is ALWAYS going to be updated first.

| Version | Tests | Namespace | Code | PHP Version | Status |
|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|------------------------------------------------------------------|--------|----------------------|
| 2.8.x | [![5x](https://github.com/serbanghita/Mobile-Detect/actions/workflows/test.yml/badge.svg?branch=2.8.x)](https://github.com/serbanghita/Mobile-Detect/actions/workflows/test.yml) | `\Mobile_Detect` | [2.8](https://github.com/serbanghita/Mobile-Detect/tree/2.8.x) | \>=5.0,<7.0 | Deprecated |
| 3.74.x | [![7x](https://github.com/serbanghita/Mobile-Detect/actions/workflows/test.yml/badge.svg?branch=3.74.x)](https://github.com/serbanghita/Mobile-Detect/actions/workflows/test.yml) | `Detection\MobileDetect` | [3.74](https://github.com/serbanghita/Mobile-Detect/tree/3.74.x) | >=7.3,<8.0 | LTS |
| 4.8.x | [![7x](https://github.com/serbanghita/Mobile-Detect/actions/workflows/test.yml/badge.svg?branch=4.8.x)](https://github.com/serbanghita/Mobile-Detect/actions/workflows/test.yml) | `Detection\MobileDetect` | [4.8](https://github.com/serbanghita/Mobile-Detect/tree/4.8.x) | >=8.0 | Current, Recommended |


## Installing

- Install via [composer](https://packagist.org/packages/mobiledetect/mobiledetectlib): `composer require mobiledetect/mobiledetectlib`
Expand All @@ -46,14 +56,6 @@ $detect->setUserAgent('Mozilla/5.0 (iPad; CPU OS 14_7 like Mac OS X) ...');
$deviceType = ($detect->isMobile() ? ($detect->isTablet() ? 'tablet' : 'phone') : 'computer');
```

## Versions

| Version | Status | Namespace | Code | PHP Version |
|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|------------------------------------------------------------------|--------|
| 2.8.x | [![5x](https://github.com/serbanghita/Mobile-Detect/actions/workflows/test.yml/badge.svg?branch=2.8.x)](https://github.com/serbanghita/Mobile-Detect/actions/workflows/test.yml) | `\Mobile_Detect` | [2.8](https://github.com/serbanghita/Mobile-Detect/tree/2.8.x) | \>=5.0,<7.0 |
| 3.74.x | [![7x](https://github.com/serbanghita/Mobile-Detect/actions/workflows/test.yml/badge.svg?branch=3.74.x)](https://github.com/serbanghita/Mobile-Detect/actions/workflows/test.yml) | `Detection\MobileDetect` | [3.74](https://github.com/serbanghita/Mobile-Detect/tree/3.74.x) | >=7.3,<8.0 |
| 4.8.x | [![7x](https://github.com/serbanghita/Mobile-Detect/actions/workflows/test.yml/badge.svg?branch=4.8.x)](https://github.com/serbanghita/Mobile-Detect/actions/workflows/test.yml) | `Detection\MobileDetect` | [4.8](https://github.com/serbanghita/Mobile-Detect/tree/4.8.x) | >=8.0 |

## Project structure

```shell
Expand Down Expand Up @@ -87,6 +89,8 @@ $deviceType = ($detect->isMobile() ? ($detect->isTablet() ? 'tablet' : 'phone')

## Performance

Results are taken from a PC with 32GB RAM, i7-10700KF CPU, Win11 Pro, PHP 8.x (xdebug: yes, opcache: no)

```shell
+-------------------+--------------------------------+-----+------+-----+----------+------------------+--------+
| benchmark | subject | set | revs | its | mem_peak | mode | rstdev |
Expand Down

0 comments on commit dd87abc

Please sign in to comment.