PHPackages                             gertexllc/yii2-bootstrap-detector - 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. gertexllc/yii2-bootstrap-detector

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

gertexllc/yii2-bootstrap-detector
=================================

A Yii2 component to detect the used Bootstrap version and return it.

1.0.1-stable(3y ago)05MITPHPPHP &gt;=7.1

Since Apr 28Pushed 3y ago1 watchersCompare

[ Source](https://github.com/gertexllc/yii2-bootstrap-detector)[ Packagist](https://packagist.org/packages/gertexllc/yii2-bootstrap-detector)[ RSS](/packages/gertexllc-yii2-bootstrap-detector/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Yii2 Bootstrap Detector
=======================

[](#yii2-bootstrap-detector)

A Yii2 component to detect the used Bootstrap version and return it.

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

[](#installation)

You can install this component via Composer by running the following command:

```
composer require gertexllc/yii2-bootstrap-detector
```

Usage
-----

[](#usage)

To use the Bootstrap detector, simply create a new instance of the `BootstrapDetector` class and call the `detectVersionNumber()` or `detectMajorVersion()` methods:

```
use gertexllc\yii2bootstrapdetector\BootstrapDetector;

// Detect the full version number
$detector = new BootstrapDetector();
$version = $detector->detectVersionNumber(); // e.g. "4.6.0"

// Detect the major version number only
$detector = new BootstrapDetector();
$majorVersion = $detector->detectMajorVersion(); // e.g. "4"
```

The `detectVersionNumber()` method returns the full version number of the detected Bootstrap version, or `null` if no version is detected. The `detectMajorVersion()` method returns only the major version number of the detected Bootstrap version, or `null` if no version is detected.

Requirements
------------

[](#requirements)

This component requires Yii2 and the Bootstrap asset bundles used by your Yii2 application.

License
-------

[](#license)

This component is released under the MIT License. See the [LICENSE](LICENSE) file for details.

Author
------

[](#author)

The `BootstrapDetector` was developed and brought to you free of charge by GerTex, LLC

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

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

Total

2

Last Release

1110d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/240916dbb06efe8727f00784073979cd5c1d4c47ddb8bc23b202d29b170b649e?d=identicon)[gertexllc](/maintainers/gertexllc)

---

Top Contributors

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

---

Tags

detectoryii2bootstrap

### Embed Badge

![Health badge](/badges/gertexllc-yii2-bootstrap-detector/health.svg)

```
[![Health](https://phpackages.com/badges/gertexllc-yii2-bootstrap-detector/health.svg)](https://phpackages.com/packages/gertexllc-yii2-bootstrap-detector)
```

###  Alternatives

[bizley/ajaxdropdown

Bootstrap dropdown list with AJAX data.

1524.8k](/packages/bizley-ajaxdropdown)[digitv/yii2bootstrap4

Yii2 Bootstrap 4 widgets

142.5k](/packages/digitv-yii2bootstrap4)

PHPackages © 2026

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