ppito/laminas-whoops 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

ppito/laminas-whoops

最新稳定版本:2.3.0

Composer 安装命令:

composer require ppito/laminas-whoops

包简介

Laminas-Whoops, integrated whoops in Laminas Framework

README 文档

README

Whoops!

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

  1. cd my/project/directory

  2. create a composer.json file with following contents:

    {
        "require-dev": {
            "ppito/laminas-whoops": "^2.0"
        }
    }
  3. install composer via curl -s http://getcomposer.org/installer | php (on windows, download http://getcomposer.org/installer and execute it with PHP)

  4. run php composer.phar install

  5. open my/project/directory/configs/modules.config.php and add the following key :

    'WhoopsErrorHandler', // must be added as the first module
  6. optional : copy config/module.config.php in my/project/directory/config/autoload/laminas-whoops.local.php

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

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.

统计信息

  • 总下载量: 535.48k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 6
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04