guanguans/yii-var-dumper

Bringing the symfony/var-dumper to Yii. - 将 symfony/var-dumper 带到 Yii。

v1.0.4 2021-10-16 08:15 UTC

This package is auto-updated.

Last update: 2024-11-16 14:55:09 UTC


README

usage

CI Build Status StyleCI Latest Stable Version Total Downloads License

Bringing the symfony/var-dumper to Yii - 将 symfony/var-dumper 集成到 Yii。

Requirement

  • Yii >= 2.0

Installation

$ composer require guanguans/yii-var-dumper --dev -v

Configuration

Config config/main.php file add:

...
'bootstrap' => [
    ...
    'dumper',
    ...
],
'modules' => [
    ...
    'dumper' => [
        'class' => 'Guanguans\YiiVarDumper\Module',
        // 'host' => 'tcp://127.0.0.1:9913',
    ],
    ...
],
...

Usage

Run dumper/server

$ php yii dumper/server

You can set the output format to HTML using the --format option:

$ php yii dumper/server --format=html > dump.html
# or
$ php yii dumper/server -f=html > dump.html

Dump your variate

<?php
dump($yourVariate);

Output result

cli

html

Testing

$ composer test

Related Links

License

MIT