PHPackages                             alexander-suter/yii2-browser-info - 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. alexander-suter/yii2-browser-info

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

alexander-suter/yii2-browser-info
=================================

Browser Information for Yii2

2.0.2(11y ago)22.4kBSD-3-ClausePHP

Since May 22Pushed 11y ago1 watchersCompare

[ Source](https://github.com/alexander-suter/yii2-browser-info)[ Packagist](https://packagist.org/packages/alexander-suter/yii2-browser-info)[ Docs](https://github.com/alexander-suter/yii2-browser-info)[ RSS](/packages/alexander-suter-yii2-browser-info/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (4)Versions (8)Used By (0)

yii2-browser-info
=================

[](#yii2-browser-info)

[![Latest Stable Version](https://camo.githubusercontent.com/6f195507fd438bbd7b4a00cabbd8532b4d6d0a4ba0a354fb64e64b835845500d/68747470733a2f2f706f7365722e707567782e6f72672f616c6578616e6465722d73757465722f796969322d62726f777365722d696e666f2f762f737461626c65)](https://packagist.org/packages/alexander-suter/yii2-browser-info)[![Total Downloads](https://camo.githubusercontent.com/64b19674fd4cb4d1623535ba6f7521c5e88f503272dc30e8e8f153d3321fb40e/68747470733a2f2f706f7365722e707567782e6f72672f616c6578616e6465722d73757465722f796969322d62726f777365722d696e666f2f646f776e6c6f616473)](https://packagist.org/packages/alexander-suter/yii2-browser-info)[![Build Status](https://camo.githubusercontent.com/c3e00dba52d747dcf2654375464afbf3c363b36801a349f2d428e9d3b40c2628/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f616c6578616e6465722d73757465722f796969322d62726f777365722d696e666f2e706e67)](http://travis-ci.org/alexander-suter/yii2-browser-info)[![Dependency Status](https://camo.githubusercontent.com/40ab454a850f5c588cff3fa27b9ce1623f0b33aa6277d56ae143453ef2252ed7/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f616c6578616e6465722d73757465723a796969322d62726f777365722d696e666f2f6465762d6d61737465722f62616467652e706e67)](https://www.versioneye.com/php/alexander-suter:yii2-browser-info/dev-master)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/21f8f933aa23a9d630a7a28b47c9c98722e8cb3161b14e05d81797edf25424d1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616c6578616e6465722d73757465722f796969322d62726f777365722d696e666f2f6261646765732f7175616c6974792d73636f72652e706e673f733d62313037346131666636643062323134643534666135616237616262623930666330393234373164)](https://scrutinizer-ci.com/g/alexander-suter/yii2-browser-info/)

Yii2 extension. Provides detailed information about the browser.

Current available providers:

- Browscap ()

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

To install, either run

```
$ php composer.phar require alexander-suter/yii2-browser-info "*"

```

or add

```
"alexander-suter/yii2-browser-info": "*"

```

to the `require` section of your `composer.json` file.

Usage
-----

[](#usage)

This extensions works with a cache in the background. You have to update the cache from time to time.

Create a cronjob and execute following command:

```
./yii browser-info/update-cache

```

Use dependency injection to define the concret instance:

```
Yii::$container->set('asu\browserinfo\BrowserInfo', [
            'class' => 'asu\browserinfo\BrowserInfoBrowscap',
            'memoryLimit' => '512M'
]);
```

The Browscap implementation needs much memory to update the cache.

To get browser information in a controller you can now use your DI-Definition:

```
class SiteController extends Controller {
      private $browserInfo = null;
      public function __construct($id, $module, BrowserInfo $browserInfo, $config = []) {
        $this->browserInfo = $browserInfo;
        parent::__construct($id, $module, $config);
      }
      public function actionIndex() {
        echo $this->browserInfo->getBrowserName();
      }
}
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~6 days

Total

7

Last Release

4024d ago

Major Versions

1.1.0 → 2.0.02015-05-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b0af81ad75ad753963108736ee05ad9d80ae0c4b59b016a6bad6e645ee799e5?d=identicon)[alexsuter](/maintainers/alexsuter)

---

Top Contributors

[![alexsuter](https://avatars.githubusercontent.com/u/7498380?v=4)](https://github.com/alexsuter "alexsuter (37 commits)")

---

Tags

browseryii2browser-info

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alexander-suter-yii2-browser-info/health.svg)

```
[![Health](https://phpackages.com/badges/alexander-suter-yii2-browser-info/health.svg)](https://phpackages.com/packages/alexander-suter-yii2-browser-info)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[imanilchaudhari/yii2-currency-converter

This extension will help to find out current currency conversion rate.

2111.7k](/packages/imanilchaudhari-yii2-currency-converter)

PHPackages © 2026

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