webinertia/bjy-profiler

Laminas\Db 数据库分析器。此模块是从 rafalli/BjyProfiler 分支出来的。

0.0.11 2023-07-02 17:06 UTC

This package is auto-updated.

Last update: 2024-09-10 01:08:49 UTC


README

您必须运行 php >= 8.0 才能使用此软件包。到目前为止,唯一的更改是更新软件包以便其可以为 php 8.1 安装,并更新返回类型和语法以适应 8.0。

BjyProfiler

为 Laminas\Db 提供数据库查询分析器扩展,以及类似于 ZF1 的 Zend_Db_Profiler 的分析器。我从 ZF1 的 Zend_Db 中移植了大部分代码。

注意:此模块现在与 Laminas\Db 的内置分析器一起工作。

注意:使用查询配置需要 PHP >= 5.5 的堆栈跟踪。

Composer/Packagist 用户

========================

composer require --dev webinertia/bjy-profiler

配置与使用

BjyProfiler 添加到您的 development.config.php 文件中的 modules 部分,例如

return [
    // Additional modules to include when in development mode
    'modules' => [
        'Laminas\\DeveloperTools',
        'BjyProfiler',
    ],
    // Configuration overrides during development mode
    'module_listener_options' => [
        'config_glob_paths' => [realpath(__DIR__) . '/autoload/{,*.}{global,local}-development.php'],
        'config_cache_enabled' => false,
        'module_map_cache_enabled' => false,
    ],
];
$profiler = $sl->get('Laminas\Db\Adapter\Adapter')->getProfiler();
$queryProfiles = $profiler->getQueryProfiles();