承接 concrete5cojp/concrete5_debugbar 相关项目开发

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

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

concrete5cojp/concrete5_debugbar

Composer 安装命令:

composer require concrete5cojp/concrete5_debugbar

包简介

A package to integrate PHP Debug Bar with concrete5 CMS.

README 文档

README

A package to integrate PHP Debug Bar with concrete5 CMS.

Installation

Install the debug bar to the site that managed using composer

If you are managing your concrete5 site using concrete5/composer, you can manage this package with composer too.

1. Modify your composer.json file

Add these packages to "require" section:

"concrete5cojp/concrete5_debugbar": "~0.2",
"slowprog/composer-copy-file": "~0.2"

Add these lines to "extra" section:

"copy-file": {
  "vendor/maximebf/debugbar/src/DebugBar/Resources/": "public/packages/concrete5_debugbar/vendor/maximebf/debugbar/src/DebugBar/Resources/"
}

Add "scripts" section:

"scripts": {
  "post-install-cmd": [
    "SlowProg\\CopyFile\\ScriptHandler::copy"
  ],
  "post-update-cmd": [
    "SlowProg\\CopyFile\\ScriptHandler::copy"
  ]
}

When you are managing your concrete5 site using composer, the vendor directory is outside from the document root. However, the debugbar package has some css/js/images in the vendor directory, so you have to move these static files. That's why we need to add the composer-copy-file package and the scripts section. You are also able to move Resources directory manually.

Entire composer.json example:

{
  "name": "concrete5/composer",
  "description": "A fully featured skeleton for a composer managed concrete5 site",
  "type": "project",
  "license": "MIT",
  "prefer-stable": true,
  "autoload": {
    "psr-4": {
      "ConcreteComposer\\" : "./src"
    }
  },
  "require": {
    "composer/installers": "^1.3",
    "concrete5/core": "^8.3",
    "vlucas/phpdotenv": "^2.4",
    "concrete5cojp/concrete5_debugbar": "dev-master",
    "slowprog/composer-copy-file": "~0.2"
  },
  "config": {
    "preferred-install": "dist"
  },
  "extra": {
    "branch-alias": {
      "dev-8.x": "8.x-dev"
    },
    "installer-paths": {
      "public/concrete": ["type:concrete5-core"],
      "public/application/themes/{$name}": ["type:concrete5-theme"],
      "public/packages/{$name}": ["type:concrete5-package"],
      "public/application/blocks/{$name}": ["type:concrete5-block"]
    },
    "copy-file": {
      "vendor/maximebf/debugbar/src/DebugBar/Resources/": "public/packages/concrete5_debugbar/vendor/maximebf/debugbar/src/DebugBar/Resources/"
    }
  },
  "scripts": {
    "post-install-cmd": [
      "SlowProg\\CopyFile\\ScriptHandler::copy"
    ],
    "post-update-cmd": [
      "SlowProg\\CopyFile\\ScriptHandler::copy"
    ]
  }
}

2. Download the package

$ composer update

3. Install the package

$ ./public/concrete/bin/concrete5 c5:package-install concrete5_debugbar

Install the debug bar to the site that managed without using composer

First, download package files

$ cd ./packages
$ git clone git@github.com:concrete5cojp/concrete5_debugbar.git
$ cd concrete5_debugbar

Then update composer.json as

{
    "name": "concrete5cojp/concrete5_debugbar",
    "description": "A package to integrate PHP Debug Bar with concrete5 CMS.",
    "type": "concrete5-package",
    "license": "MIT",
    "minimum-stability": "stable",
    "require": {
        "maximebf/debugbar": ">=1.0.0"
    },
    "replace": {
        "psr/log": "*",
        "symfony/polyfill-mbstring": "*"
    },
    "autoload": {
        "psr-4": {
            "Concrete5Debugbar\\": "src/Concrete5Debugbar/"
        }
    }
}

Finally you can install the package

$ composer install
$ cd ../../
$ ./concrete/bin/concrete5 c5:package-install concrete5_debugbar

Usage

Messages

You can add messages to this tab using compatible usage with PSR-3 logger.

\Core::make('debugbar/messages')->info('hello world');
\Core::make('debugbar/messages')->info($object);

Messages Tab

Timeline

Provides a way to log total execution time as well as taking "measures" (ie. measure the execution time of a particular operation).

\Core::make('debugbar/time')->startMeasure('longop', 'My long operation');
sleep(2);
\Core::make('debugbar/time')->stopMeasure('longop');

Timeline Tab

Request

You can check how concrete5 retreive request data in this tab.

Request Tab

Database

You can check all sql queries on current request in this tab.

Database Tab

Logs

You can check application logs (same as dashboard/reports/logs but you can quick access!).

Logs Tab

Environment

Get some information about the server environment.

Environment Tab

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 5
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固