PHPackages                             david221189av/mobile-detect-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. david221189av/mobile-detect-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

david221189av/mobile-detect-bundle
==================================

Symfony 3.4-6.x bundle to detect mobile devices, manage mobile view and redirect to the mobile and tablet version.

v0.0.4.x-dev(2y ago)07MITPHPPHP &gt;=8.2.3

Since Dec 5Pushed 2y agoCompare

[ Source](https://github.com/david221189av/MobileDetectBundle)[ Packagist](https://packagist.org/packages/david221189av/mobile-detect-bundle)[ Docs](https://github.com/tattali/MobileDetectBundle)[ RSS](/packages/david221189av-mobile-detect-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (15)Versions (5)Used By (0)

[![Mobile Detect](https://user-images.githubusercontent.com/10502887/161483098-d40a2d7d-0e78-4f38-a7ac-49390718746e.png)](https://user-images.githubusercontent.com/10502887/161483098-d40a2d7d-0e78-4f38-a7ac-49390718746e.png)

MobileDetectBundle
==================

[](#mobiledetectbundle)

Symfony 3.4.x-6.0.x bundle to detect mobile devices, manage mobile view and redirect to the mobile and tablet version.

[![Github Actions Status](https://github.com/tattali/MobileDetectBundle/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/tattali/MobileDetectBundle/actions/workflows/main.yml?query=branch%3Amain) [![Latest Stable Version](https://camo.githubusercontent.com/74dc153c4e0dadd40dc5fb1c6f9e43992eb1ae91e425981fc3f86ab19b94358b/687474703a2f2f706f7365722e707567782e6f72672f74617474616c692f6d6f62696c652d6465746563742d62756e646c652f76)](https://packagist.org/packages/tattali/mobile-detect-bundle) [![Total Downloads](https://camo.githubusercontent.com/0f544a5ed23d7f910013e07214d3ec32ae18172808fb7455f8b95316b4057dc7/687474703a2f2f706f7365722e707567782e6f72672f74617474616c692f6d6f62696c652d6465746563742d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/tattali/mobile-detect-bundle) [![codecov](https://camo.githubusercontent.com/581c40170fbb314c06faf7763431882be3cc1ba4a18c272ee27754b6dd31aead/68747470733a2f2f636f6465636f762e696f2f67682f74617474616c692f4d6f62696c6544657465637442756e646c652f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d485756314f5952534439)](https://codecov.io/gh/tattali/MobileDetectBundle) [![License](https://camo.githubusercontent.com/ff84c231d785364b66cdb3f805432952d11fc7d53d4982851b3032f3d7243570/687474703a2f2f706f7365722e707567782e6f72672f74617474616c692f6d6f62696c652d6465746563742d62756e646c652f6c6963656e7365)](https://packagist.org/packages/tattali/mobile-detect-bundle) [![PHP Version Require](https://camo.githubusercontent.com/a84982851924e3b73409faae166255d3625493de9a466765b794b0fab8b425b0/687474703a2f2f706f7365722e707567782e6f72672f74617474616c692f6d6f62696c652d6465746563742d62756e646c652f726571756972652f706870)](https://packagist.org/packages/tattali/mobile-detect-bundle)

*This bundle is a fork of [suncat2000/MobileDetectBundle](https://github.com/suncat2000/MobileDetectBundle). As this project doesn't look maintained anymore, we decided to create &amp; maintain a fork. For more information read our [manifest](https://github.com/tattali/MobileDetectBundle/issues/8).*

Introduction
------------

[](#introduction)

This Bundle use [Mobile\_Detect](https://github.com/serbanghita/Mobile-Detect) class and provides the following features:

- Detect the various mobile devices by Name, OS, browser User-Agent
- Manages site views for the various mobile devices (`mobile`, `tablet`, `full`)
- Redirects to mobile and tablet sites

Documentation
-------------

[](#documentation)

### Installation

[](#installation)

```
composer require tattali/mobile-detect-bundle
```

*Install with Symfony legacy versions: [here](src/Resources/doc/legacy-versions.md)*

### Usage

[](#usage)

#### Checking device

[](#checking-device)

```
use MobileDetectBundle\DeviceDetector\MobileDetectorInterface;

public function someaction(MobileDetectorInterface $mobileDetector)
{
    $mobileDetector->isMobile();
    $mobileDetector->isTablet();
    $mobileDetector->is('iPhone');
}
```

With Twig

```
{% if is_mobile() %}
{% if is_tablet() %}
{% if is_device('iPhone') %} # magic methods is[...]
```

#### Switch device view

[](#switch-device-view)

For switch device view, use `device_view` GET parameter:

```
http://localhost:8000?device_view={full/mobile/tablet}
```

Or using the Symfony toolbar [![mbd-bundle-sf-toolbar](https://user-images.githubusercontent.com/10502887/161488224-aaedde1c-d3c3-4636-8761-a207fbd5d4ff.png)](https://user-images.githubusercontent.com/10502887/161488224-aaedde1c-d3c3-4636-8761-a207fbd5d4ff.png)

#### Going further

[](#going-further)

- [Symfony legacy versions](src/Resources/doc/legacy-versions.md)
- [Redirection](src/Resources/doc/redirection.md)
- [Full reference](src/Resources/doc/reference.md)

Contribute and feedback
-----------------------

[](#contribute-and-feedback)

Any feedback and contribution will be very appreciated.

License and credits
-------------------

[](#license-and-credits)

This bundle is under the MIT license. See the complete [license](src/Resources/meta/LICENSE) in the bundle

Original authors: [suncat2000](https://github.com/suncat2000), [HenriVesala](https://github.com/HenriVesala), [netmikey](https://github.com/netmikey) and [all contributors](https://github.com/suncat2000/MobileDetectBundle/graphs/contributors)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

889d ago

PHP version history (2 changes)v0.0.1.x-devPHP &gt;=8.2.7

v0.0.4.x-devPHP &gt;=8.2.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/43a5e8fd96fc026bc75af97b5367e93301535e8854bb37c0451286a113cbe6ff?d=identicon)[david221189av](/maintainers/david221189av)

---

Top Contributors

[![suncat2000](https://avatars.githubusercontent.com/u/1162437?v=4)](https://github.com/suncat2000 "suncat2000 (83 commits)")[![tattali](https://avatars.githubusercontent.com/u/10502887?v=4)](https://github.com/tattali "tattali (75 commits)")[![HenriVesala](https://avatars.githubusercontent.com/u/965788?v=4)](https://github.com/HenriVesala "HenriVesala (11 commits)")[![netmikey](https://avatars.githubusercontent.com/u/1180845?v=4)](https://github.com/netmikey "netmikey (11 commits)")[![felp302](https://avatars.githubusercontent.com/u/2633381?v=4)](https://github.com/felp302 "felp302 (8 commits)")[![ricoli](https://avatars.githubusercontent.com/u/1648125?v=4)](https://github.com/ricoli "ricoli (6 commits)")[![erivello](https://avatars.githubusercontent.com/u/626131?v=4)](https://github.com/erivello "erivello (6 commits)")[![bocharsky-bw](https://avatars.githubusercontent.com/u/3317635?v=4)](https://github.com/bocharsky-bw "bocharsky-bw (6 commits)")[![Ninir](https://avatars.githubusercontent.com/u/855022?v=4)](https://github.com/Ninir "Ninir (5 commits)")[![xabbuh](https://avatars.githubusercontent.com/u/1957048?v=4)](https://github.com/xabbuh "xabbuh (4 commits)")[![alexhoma](https://avatars.githubusercontent.com/u/7917771?v=4)](https://github.com/alexhoma "alexhoma (3 commits)")[![eugene-yurkevich](https://avatars.githubusercontent.com/u/198213176?v=4)](https://github.com/eugene-yurkevich "eugene-yurkevich (3 commits)")[![JonasHaouzi](https://avatars.githubusercontent.com/u/8245107?v=4)](https://github.com/JonasHaouzi "JonasHaouzi (3 commits)")[![trq](https://avatars.githubusercontent.com/u/32683?v=4)](https://github.com/trq "trq (3 commits)")[![NicolasBadey](https://avatars.githubusercontent.com/u/639268?v=4)](https://github.com/NicolasBadey "NicolasBadey (2 commits)")[![iamdey](https://avatars.githubusercontent.com/u/65737?v=4)](https://github.com/iamdey "iamdey (2 commits)")[![sfdumi](https://avatars.githubusercontent.com/u/3295012?v=4)](https://github.com/sfdumi "sfdumi (2 commits)")[![netbull](https://avatars.githubusercontent.com/u/2797954?v=4)](https://github.com/netbull "netbull (2 commits)")[![juulrecognize](https://avatars.githubusercontent.com/u/61468406?v=4)](https://github.com/juulrecognize "juulrecognize (2 commits)")[![david221189av](https://avatars.githubusercontent.com/u/46351861?v=4)](https://github.com/david221189av "david221189av (2 commits)")

---

Tags

symfonymobile detectmobile view managingdevice detectmobiledetectdevice detectormobiledetectbundlesymfony mobile detectsymfony mobiledetect

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/david221189av-mobile-detect-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/david221189av-mobile-detect-bundle/health.svg)](https://phpackages.com/packages/david221189av-mobile-detect-bundle)
```

###  Alternatives

[tattali/mobile-detect-bundle

Symfony 5.x-7.x bundle to detect mobile devices, manage mobile view and redirect to the mobile and tablet version.

371.0M1](/packages/tattali-mobile-detect-bundle)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
