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↓50%MITPHPPHP ^8.2

Since Aug 27Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/resist/device)[ Packagist](https://packagist.org/packages/resist/device)[ RSS](/packages/resist-device/feed)WikiDiscussions main Synced 1mo 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

39

—

LowBetter than 86% of packages

Maintenance48

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

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

866d 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

[wallabag/wallabag

open source self hostable read-it-later web application

12.6k2.2k](/packages/wallabag-wallabag)[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)[netgen/content-browser

Netgen Content Browser is a Symfony bundle that provides an interface which selects items from any kind of backend and returns the IDs of selected items back to the calling code.

14112.1k8](/packages/netgen-content-browser)[leapt/core-bundle

Symfony LeaptCoreBundle

2529.1k4](/packages/leapt-core-bundle)

PHPackages © 2026

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