verbb / kint

Adds Kint, an in-app PHP debugger, to Craft CMS for use in Twig and PHP.
MIT License
3 stars 3 forks source link

Built in config files #6

Closed mikesnoeren closed 2 years ago

mikesnoeren commented 2 years ago

What are you trying to do?

Add config files for Kint settings. We currently do it this way, which doesn't align with all our other configurations:

<?php
if (!class_exists('Kint\Renderer\RichRenderer')) {
    return;
}

// Kint\Kint::$max_depth = 4; // <- this doesn't work in the verbb version anymore, can this be fixed too? :)
Kint\Renderer\RichRenderer::$folder = true;

What's your proposed solution?

Add a settings php file so we can give the plugin an array with settings

Additional context

No response

engram-design commented 2 years ago

Added kintSettings and richRendererSettings plugin settings to control this. Refer to the docs. 3.1.0

By the way, looks like Kint has changed $max_depth

mikesnoeren commented 2 years ago

Thanks for the quick fix @engram-design, much appreciated!