portospire / bjy-profiler
Database profiler for Laminas\Db (also plugin for LaminasDeveloperTools). Module forked from andrey-mokhov/bjy-profiler
1.3.4
2022-07-03 21:47 UTC
Requires
- php: ^7.0 || ^8.0
- laminas/laminas-db: ^2.7
- laminas/laminas-log: ^2.7
- laminas/laminas-modulemanager: ^2.7
- laminas/laminas-servicemanager: ^3.0.3
Requires (Dev)
- laminas/laminas-mvc: ^3.0
- phpunit/phpunit: ^6.0
This package is auto-updated.
Last update: 2024-11-30 02:03:23 UTC
README
Version 1.3.4
Provides Laminas\Db adapters with extensions for database query profiling, as well as a profiler similar to ZF1's Zend_Db_Profiler. BJYoungblood ported much of this code from ZF1's Zend_Db.
Note: this module now works with Laminas\Db's built-in profiler.
Note: PHP >= 5.5 is required for stack traces with query profiles.
Composer/Packagist Users
composer require --dev portospire/bjy-profiler
Configuration & Usage
Add BjyProfiler
to your development.config.php
in section modules
, example:
return [ // Additional modules to include when in development mode 'modules' => [ '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();