Download the PHP package thangnm93/yii2-decomposer without Composer
On this page you can find all versions of the php package thangnm93/yii2-decomposer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thangnm93/yii2-decomposer
More information about thangnm93/yii2-decomposer
Files in thangnm93/yii2-decomposer
Package yii2-decomposer
Short Description A Yii2 package to decompose your installed packages, their dependencies, your app & server environment
License MIT
Homepage https://github.com/thangnm93/yii2-decomposer
Informations about the package yii2-decomposer
Decomposer Extension for Yii 2
For license information check the LICENSE-file.
Introduction
Yii 2 Decomposer decomposes and lists all the installed packages and their dependencies along with the Yii 2 Framework & 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
This extension base on lubusIN/laravel-decomposer wrapper for Laravel user component.
Requirements
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply modify your application configuration as follows:
Config common/config/main.php
to use Yii::$app->decompose
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:
-
Then use the
getReportArray()
helper method as follows: - It returns a multi-dimensional associative array with 4 keys: Server Environment, Yii 2 Environment & Installed Packages & 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:
-
Then use the
getReportJson()
helper method as follows: - It returns the report as JSON
Testing
Contributing
Thank you for considering contributing to the Yii 2 Decomposer. You can read the contribution guide lines here
Security
If you discover any security related issues, please email to [email protected].