PHPackages                             thangnm93/yii2-decomposer - 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. thangnm93/yii2-decomposer

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

thangnm93/yii2-decomposer
=========================

A Yii2 package to decompose your installed packages, their dependencies, your app &amp; server environment

v0.1.5(3y ago)324MITPHPPHP &gt;=7.2

Since Jul 16Pushed 3y ago1 watchersCompare

[ Source](https://github.com/thangnm93/yii2-decomposer)[ Packagist](https://packagist.org/packages/thangnm93/yii2-decomposer)[ Docs](https://github.com/thangnm93/yii2-decomposer)[ RSS](/packages/thangnm93-yii2-decomposer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (3)Versions (7)Used By (0)

 [ ![](https://avatars0.githubusercontent.com/u/993323) ](https://github.com/yiisoft)

Decomposer Extension for Yii 2
==============================

[](#decomposer-extension-for-yii-2)

For license information check the [LICENSE](LICENSE.txt)-file.

[![Latest Stable Version](https://camo.githubusercontent.com/d05e6ca2bf12e373a35bfe52eb2f288d9c9d7c30615a9aac19f8f62562b5fae4/68747470733a2f2f706f7365722e707567782e6f72672f7468616e676e6d39332f796969322d6465636f6d706f7365722f762f737461626c65)](https://packagist.org/packages/thangnm93/yii2-decomposer)[![Total Downloads](https://camo.githubusercontent.com/ec0abace490c0186491cf4c0fae7bd982338bc8cf63712b81e44514521214f53/68747470733a2f2f706f7365722e707567782e6f72672f7468616e676e6d39332f796969322d6465636f6d706f7365722f646f776e6c6f616473)](https://packagist.org/packages/thangnm93/yii2-decomposer)[![License](https://camo.githubusercontent.com/1dfbac2bb5c6699aafa2549bfad75ee22f85394f6d2fd255a9830903270ab4cb/68747470733a2f2f706f7365722e707567782e6f72672f7468616e676e6d39332f796969322d6465636f6d706f7365722f6c6963656e7365)](https://github.com/thangnm93/yii2-decomposer/blob/master/LICENSE.txt)[![PRs](https://camo.githubusercontent.com/dd0b24c1e6776719edb2c273548a510d6490d8d25269a043dfabbd38419905da/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5052732d77656c636f6d652d627269676874677265656e2e737667)](https://github.com/thangnm93/yii2-decomposer/blob/master/contributing.md)

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

[](#introduction)

---

Yii 2 Decomposer decomposes and lists all the installed packages and their dependencies along with the Yii 2 Framework &amp; the Server environment details your app is running in. All these just on the hit of a single route at `your-domain/decomposer`.

The demo of this extension is available at [HERE](screenshots/decomposer.png)

This extension base on [lubusIN/laravel-decomposer](https://github.com/lubusIN/laravel-decomposer) wrapper for Laravel user component.

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

[](#requirements)

---

- [PHP &gt;= 7.2](http://php.net)
- [yiisoft/yii2 &gt;= 2.0.13](https://github.com/yiisoft/yii2)

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

[](#installation)

---

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

Either run

```
composer require thangnm93/yii2-decomposer

```

or add

```
"thangnm93/yii2-decomposer": "*"

```

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

Usage
-----

[](#usage)

---

Once the extension is installed, simply modify your application configuration as follows:

```
return [
    'bootstrap' => ['decomposer'],
    'modules' => [
        'decomposer' => [
            'class' => 'thangnm93\decomposer\Module',
        ],
        // ...
    ],
    ...
];
```

Config `common/config/main.php` to use `Yii::$app->decompose`

```
return [
    'components' => [
        'decompose' => [
            'class' => 'thangnm93\decomposer\Decomposer',
        ],
    ],
    ...
];
```

Get Report as an Array

- You might want to access the Decomposer Report in your code so that it could be passed to any third party services like Bugsnag, etc. or maybe you want to log it yourself somewhere if required.
- The `getReportArray()` helper method has been introduced to solve the same requirement.
- First use the Decomposer class at the top as follows:

    ```
    use thangnm93\decomposer\helpers\DecomposerHelper;
    ```
- Then use the `getReportArray()` helper method as follows:

    ```
    $decomposerStats = DecomposerHelper::getReportArray();
    ```
- It returns a multi-dimensional associative array with 4 keys: Server Environment, Yii 2 Environment &amp; Installed Packages &amp; Extra stats(If you or a package in your app have added any) having the respective details as an associative array.

Get Report as JSON

- You might want to access the same Decomposer Report as JSON
- The `getReportJson()` helper method has been introduced to solve the same requirement.
- First use the Decomposer class at the top as follows:

    ```
    use thangnm93\decomposer\helpers\DecomposerHelper;
    ```
- Then use the `getReportJson()` helper method as follows:

    ```
    $decomposerStats = DecomposerHelper::getReportJson();
    ```
- It returns the report as JSON

Testing
-------

[](#testing)

```
$ ./vendor/bin/phpunit --testdox --coverage-text --coverage-clover=coverage.clover
```

Contributing
------------

[](#contributing)

---

Thank you for considering contributing to the Yii 2 Decomposer. You can read the contribution guide lines [here](contributing.md)

Security
--------

[](#security)

---

If you discover any security related issues, please email to .

Credits
-------

[](#credits)

---

- [Thang Nguyen](https://github.com/thangnm93)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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

6

Last Release

1394d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a326342a664da519823cd8f2ba5076684384c42be948beaa409400679e830828?d=identicon)[thangnm93](/maintainers/thangnm93)

---

Top Contributors

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

---

Tags

decomposeryii2yii2-decomposeryii2-extensionyii2thangnm93decomposeryii2 decomposer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thangnm93-yii2-decomposer/health.svg)

```
[![Health](https://phpackages.com/badges/thangnm93-yii2-decomposer/health.svg)](https://phpackages.com/packages/thangnm93-yii2-decomposer)
```

###  Alternatives

[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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