beastbytes / yii-tracy
Configuration to integrate the Tracy Yii Framework Latte Template Renderer
Requires
- php: ^8.1
- latte/latte: dev-master
- psr/container: 2.0
- tracy/tracy: ^3.0-dev
- yiisoft/aliases: ^3.0
- yiisoft/factory: ^1.0
- yiisoft/yii-http: ^1.0
Requires (Dev)
- phpunit/phpunit: ^10.0
- vimeo/psalm: ^5.0
- yiisoft/di: ^1.0
- yiisoft/dummy-provider: ^1.0
- yiisoft/router: ^4.0
This package is auto-updated.
Last update: 2025-06-23 00:51:06 UTC
README
The Yii-Tracy package integrates the Tracy debugging tool into Yii3 by providing the necessary configuration.
Requirements
- PHP 8.1 or higher
Installation
Install the package using Composer:
Either:
composer require beastbytes/yii-tracy
or add the following to the require
section of your composer.json
"beastbytes/yii-tracy": "<version_constraint>"
Configuration
Yii-Tracy is configured using Yii’s configuration. It has the following configuration parameters:
- mode (null|bool|string|array) The mode that Tracy is to operate in; Development or Production.
-
Tracy\Debugger::Detect
: Tracy detects the mode; it sets development mode is if it is running on localhost (i.e. IP address 127.0.0.1 or ::1) and there is no proxy, otherwise it sets production mode. -
Tracy\Debugger::Development
: put Tracy in development mode. -
Tracy\Debugger::Production
: put Tracy in production mode. -
string: enable development mode for the given IP address.
-
string[]: enable development mode for IP addresses in the list.
NOTE It is highly recommended to combine IP addresses with a cookie token by specifying allowed addresses as
<token>@<ipAddress>
; see token.
-
- editor (string) Tracy IDE integration
- email (null|string|string[]) Email address(es) to which send error notifications
- logDirectory (string) Path alias to the log directory. Default:
'@runtime/logs'
- logSeverity (int) Log bluescreen in production mode for this error severity.
- panels (array[]) List of panels available to Tracy and their configuration.
- showBar (bool) Whether to display debug bar in development mode.
- token (string) The secret token for enabling development mode for IP addresses. See mode
Panels
Yii Tracy defines a set of panels that can be added to the debugger bar; it is also possible to add user defined panels.
Auth
Provides information about the current user.
Database
Provides information about the database connection and executed queries.
Event
Not sure what yet
Request
Provides information about the current request.
Route
Provides information about the current route.
Session
Provides information about the session.
View
Provides information about the rendered view.
User Defined Panel
To define a panel for Tracy create a class that extends BeastBytes\Yii\Tracy\Panel\Panel
and implements Tracy\IBarPanel
, and add its configuration to 'beastbytes/yii-tracy'['panels']
.
See Tracy Bar Extensions for more information and examine the packages panels for example code.
License
The BeastBytes Yii Tracy package is free software. It is released under the terms of the BSD License.
Please see LICENSE
for more information.