Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 1.18 KB

twig_var_dumper.md

File metadata and controls

55 lines (41 loc) · 1.18 KB

Twig Var Dumper

Integrate the symfony/var-dumper component with Twig to get pretty dumps:

twig var dumper

Installation

Yves

Add the TwigVarDumpServiceProvider to your ShopApplicationDependencyProvider (you may need to create the method below if it does not exist):

<?php

namespace Pyz\Yves\ShopApplication;

// ...
use Inviqa\Shared\SprykerDebug\Plugin\Provider\TwigVarDumpServiceProvider;

class ShopApplicationDependencyProvider extends SprykerShopApplicationDependencyProvider
{
    protected function getApplicationPlugins(): array
    {
        return [
            // ...
            new TwigVarDumpApplicationPlugin(),
        ];
    }
}

Zed

Add the TwigVarDumpServiceProvider to your ApplicationDependencyProvider:

<?php

// ...
use Inviqa\Shared\SprykerDebug\Plugin\Provider\TwigVarDumpServiceProvider;

class ApplicationDependencyProvider extends SprykerApplicationDependencyProvider
{
    protected function getApplicationPlugins(Container $container)
    {
        return [
            // ...
            new TwigVarDumpApplicationPlugin()
        ]);
    }
}