miniframe/developer-toolbar
Composer 安装命令:
composer require miniframe/developer-toolbar
包简介
Developer toolbar for the Miniframe PHP Framework
README 文档
README
This library adds a basic developer toolbar to the Miniframe PHP Framework.
How to install
- In your existing project, type:
composer require --dev miniframe/developer-toolbar - Add the directive below to a
/config/development.ini - Add the development.ini to your
.gitignore(you won't want to have this running on production!)
Example development.ini directives
[framework]
middleware[] = Miniframe\Toolbar\Middleware\DeveloperToolbar
[developer-toolbar]
log_path = cache/debug
Add the Middleware as high as possible in the Middleware list, so it's loaded before other middlewares get the chance of throwing errors.
How to use
On each HTML page, a bug icon is added. If you click on it, a new tab will open with debugging information.
When debugging non-HTML pages, look at the headers (Most browsers: F12 -> Network tab) and locate the X-Debug-URL header.
If you open that URL, you will also get the debugging page.
In code, you can add var dumps to the debugging page by using:
dump(['foo', 'bar']);
It's also possible to add custom errors to the debugging page by using:
// notice:
trigger_error('foo bar');
// warning:
trigger_error('foo bar', E_USER_WARNING);
// or a deprecation notice:
trigger_error("Since Core v1.0.0: Test deprecation", E_USER_DEPRECATED);
For Windows Developers
In the bin folder, a few batch files exist, to make development easier.
If you install Docker Desktop for Windows, you can use bin\composer.bat, bin\phpcs.bat, bin\phpunit.bat, bin\phpstan.bat and bin\security-checker.bat as shortcuts for Composer, CodeSniffer, PHPUnit, PHPStan and the Security Checker, without the need of installing PHP and other dependencies on your machine.
The same Docker container and tools are used in Bitbucket Pipelines to automatically test this project.
miniframe/developer-toolbar 适用场景与选型建议
miniframe/developer-toolbar 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.04k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 08 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 miniframe/developer-toolbar 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 miniframe/developer-toolbar 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.04k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 10
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: CC-BY-SA-4.0
- 更新时间: 2021-08-19