PHPackages                             resist/device - 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. resist/device

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

resist/device
=============

Simple mobile detector for Symfony + Twig

1.0.3(2y ago)02.3k↓75%MITPHPPHP ^8.2

Since Aug 27Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/resist/device)[ Packagist](https://packagist.org/packages/resist/device)[ RSS](/packages/resist-device/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

Device
======

[](#device)

[![](https://camo.githubusercontent.com/761fa19d1e55719350d7d76c0cb338bf828f18c37ed00ab70f65a1549a86f8fa/68747470733a2f2f7374727563747572652e68752f696d672f7265736973742e706e67)](https://camo.githubusercontent.com/761fa19d1e55719350d7d76c0cb338bf828f18c37ed00ab70f65a1549a86f8fa/68747470733a2f2f7374727563747572652e68752f696d672f7265736973742e706e67)

**Simple mobile detector for Symfony + Twig**
[github.com/resist/device](https://github.com/resist/device/)
© resist

---

Light-weight tool for mobile detection, not for 100% hit rate. Mobile detection based on [Fat Free Framework](https://fatfreeframework.com)'s [Audit class](https://github.com/bcosca/fatfree/blob/master/lib/audit.php).

Install:
--------

[](#install)

```
composer require resist/device
```

Usage
-----

[](#usage)

Use `Device` as injected service and call `isMobile(): bool`.

Register optinal Twig `is_mobile()` function as extension:

```
# config/service.yaml

resist\Device\Device:
resist\Device\TwigDevice:
        tags: [ 'twig.extension' ]
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance45

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 52.9% of commits — single point of failure

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 ~286 days

Total

4

Last Release

912d ago

PHP version history (2 changes)1.0.0PHP &gt;=8.0

1.0.3PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/15314f60ca260822456645d8465ee03a31525ab6d8ba8dc11c34d2df2fe83682?d=identicon)[resist](/maintainers/resist)

---

Top Contributors

[![r3sist](https://avatars.githubusercontent.com/u/5300352?v=4)](https://github.com/r3sist "r3sist (9 commits)")[![resist](https://avatars.githubusercontent.com/u/2023543?v=4)](https://github.com/resist "resist (8 commits)")

### Embed Badge

![Health badge](/badges/resist-device/health.svg)

```
[![Health](https://phpackages.com/badges/resist-device/health.svg)](https://phpackages.com/packages/resist-device)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[shopware/storefront

Storefront for Shopware

684.6M236](/packages/shopware-storefront)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[metamodels/core

MetaModels core

10156.4k68](/packages/metamodels-core)[terminal42/contao-node

Node bundle for Contao Open Source CMS

3177.0k6](/packages/terminal42-contao-node)

PHPackages © 2026

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