承接 thangnm93/yii2-decomposer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

thangnm93/yii2-decomposer

最新稳定版本:v0.1.5

Composer 安装命令:

composer require thangnm93/yii2-decomposer

包简介

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

README 文档

README

Decomposer Extension for Yii 2


For license information check the LICENSE-file.

Latest Stable Version Total Downloads License PRs

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

composer require thangnm93/yii2-decomposer

or add

"thangnm93/yii2-decomposer": "*"

to the require section of your composer.json file.

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 & 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:

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

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

Testing

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

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 contact@thangnm.info.

Credits

统计信息

  • 总下载量: 24
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固