2017 © Pedro Peláez
 

symfony-bundle html-cli-dumper-bundle

Symfony bundle to view cli dumps as HTML dumps in your browser

image

fancyweb/html-cli-dumper-bundle

Symfony bundle to view cli dumps as HTML dumps in your browser

  • Thursday, July 13, 2017
  • by fancyweb
  • Repository
  • 1 Watchers
  • 0 Stars
  • 56 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 65 % Grown

The README.md

HtmlCliDumperBundle

This bundle let you view your cli dumps as HTML dumps., (*1)

For every cli dump, it creates an HTML file containing the HTML version of the dump and display the link to this file in the console., (*2)

This is especially useful when you dump a large object in a Command, and you want to check a particular property that gets lost in thousand of lines., (*3)

Installation

Download the bundle

composer require fancyweb/html-cli-dumper-bundle --dev

Register the bundle

// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        // ...
        if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
            $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
            // ...
            if ('dev' === $this->getEnvironment()) {
                // ...
                $bundles[] = new Fancyweb\HtmlCliDumperBundle\HtmlCliDumperBundle();
            }
        }
    }
    // ...
}

Requirement

This bundle only works when the Symfony DebugBundle is also registered., (*4)

Configuration

Default

html_cli_dumper:
    enabled:              true
    save_directory_path:  '%kernel.root_dir%/../web/_html_cli_dumper_data'
    view_base_url:        '%router.request_context.scheme%://%router.request_context.host%%router.request_context.base_url%/_html_cli_dumper_data'
    disable_cli_dump:     false

If you have properly configured your global request context with the dedicated parameters (cf https://symfony.com/doc/current/console/request_context.html), and if you use the default web directory, then you're good to go with the default configuration., (*5)

Details

enabled
  • Type : boolean
  • Description : Enable the bundle ?
save_directory_path
  • Type : string
  • Description : The directory path where the HTML dumps are saved. If the directory doesn't exist, it will be created.
view_base_url
  • Type : string
  • Description : The base url that is prepended before the generated HTML dump unique id.
disable_cli_dump
  • Type : boolean
  • Description : Disable the cli dump output in the console ?

The Versions

13/07 2017

dev-master

9999999-dev https://github.com/fancyweb/html-cli-dumper-bundle

Symfony bundle to view cli dumps as HTML dumps in your browser

  Sources   Download

MIT

The Requires

 

by Thomas Calvet

console html dump var-dumper

13/07 2017

v1.0.1

1.0.1.0 https://github.com/fancyweb/html-cli-dumper-bundle

Symfony bundle to view cli dumps as HTML dumps in your browser

  Sources   Download

MIT

The Requires

 

by Thomas Calvet

console html dump var-dumper

28/06 2017

v1.0.0

1.0.0.0 https://github.com/fancyweb/html-cli-dumper-bundle

Symfony bundle to view cli dumps as HTML dumps in your browser

  Sources   Download

MIT

The Requires

 

by Thomas Calvet

console html dump var-dumper