ppito/laminas-whoops
Composer 安装命令:
composer require ppito/laminas-whoops
包简介
Laminas-Whoops, integrated whoops in Laminas Framework
关键字:
README 文档
README
whoops is an error handler base/framework for PHP. Out-of-the-box, it provides a pretty error interface that helps you debug your web projects, but at heart it's a simple yet powerful stacked error handling system.
Table of Contents
Module installation
-
cd my/project/directory -
create a
composer.jsonfile with following contents:{ "require-dev": { "ppito/laminas-whoops": "^2.0" } } -
install composer via
curl -s http://getcomposer.org/installer | php(on windows, download http://getcomposer.org/installer and execute it with PHP) -
run
php composer.phar install -
open
my/project/directory/configs/modules.config.phpand add the following key :'WhoopsErrorHandler', // must be added as the first module
-
optional : copy
config/module.config.phpinmy/project/directory/config/autoload/laminas-whoops.local.php -
optional : edit
my/project/directory/config/autoload/laminas-whoops.local.php
Features
Render View Manager - Twig Support
By default this module use the simple php render, but you can now specify your favorite render.
Usage :
Twig render has been supported, you just need to change the template_render configuration:
'template_render' => 'laminas_whoops/twig_error',
Module Visibility Manager
It is now possible to manage the module loading by implement your own rules. For example, the module can be loaded only for the admin users or only for dev&preprod environments.
Usage :
- Create your own class by implement the interface VisibilityServiceInterface (or the abstract VisibilityServiceAbstract)
- @see example VisibilityService.visibility-example.php.
- Change the
visibility_service_nameconfiguration to specify the name of your class.- @see example module.config.visibility-example.php.
'visibility_service_name' => Application\Service\VisibilityService::class,
Ignored Exceptions
By default, this module will route all exceptions to Whoops; however, you can create a list of exception classes that will be ignored by Whoops.
Usage:
Set the ignored_exceptions configuration to an array of class names:
'ignored_exceptions' => [My\Exception::class, My\OtherException::class]
License
ppito/laminas-whoops is licensed under the MIT License - See the LICENSE file for details.
ppito/laminas-whoops 适用场景与选型建议
ppito/laminas-whoops 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 619.23k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2020 年 01 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「whoops」 「php error」 「laminas」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ppito/laminas-whoops 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ppito/laminas-whoops 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ppito/laminas-whoops 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Error Handler module that captures and displays all throwable errors in a given format, making debugging easier and more efficient
Error and Exception override and observers.
Error handler based on Booboo with HTML and JSON support
Error Share App, for handle error page
php error handling for cool kids
Fixed the Sublime editor link path when running a project from a VM
统计信息
- 总下载量: 619.23k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 22
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-01-14