EzDevInfo.com

kint

Kint - a powerful and modern PHP debugging tool. Kint, a debugging tool for PHP powerful and modern var_dump alternative for serious php developers.

Composer: Specify autoload_files require order

Laravel's helper function has if ( ! function_exists('xx')) protection.

Can I specify order of the autoload_files, and let Kint.class.php require before helpers.php?

return array( 
    $vendorDir . '/laravel/framework/src/Illuminate/Support/helpers.php',
    $vendorDir . '/raveren/kint/Kint.class.php',
);

Source: (StackOverflow)

Problems installing kint correctly

I downloaded kint, unzipped it and moved the folder to the Library folder. Then I put this code as the second line of my PHP file (after

require '/kint/Kint.class.php';

and now, when I go to execute the PHP code, I get a blank screen.

Was putting it in the Library folder the wrong place to put it? (the instructions say put it "somewhere comfy"... what kind of installation instruction is that?)


Source: (StackOverflow)

Advertisements

How to load external library in Phalcon?

I'm trying to load Kint into my first Phalcon project. I'm trying to use the loader.php to do so. I tried with "registerDirs", "registerClass" and "registerNamespaces".

I am used to using Kint in Symfony2 via composer but this time I tried to clone the git repo and place it in a vendors folder in this Pahlcon project. All I get when requireing the Kint class is a silent 500 internal error. The following is the code I currently have.

<?php
# app/config/loader.php

$loader = new \Phalcon\Loader();

/**
 * We're a registering a set of directories taken from the configuration file
 */
$loader->registerDirs(
    array(
        $config->application->controllersDir,
        $config->application->modelsDir,
        '~/Code/incubator/Library/Phalcon',
        "vendor/kint"
    )
)->register();

And the controller in question:

<?php
# app/controllers/indexController.php

class IndexController extends ControllerBase
{
    public function indexAction()
    {
        Kint::dump("huh");
    }
}

Source: (StackOverflow)