Last active
October 2, 2021 14:36
-
-
Save raveren/eba373d8abb572b0528c73d145103f95 to your computer and use it in GitHub Desktop.
Revisions
-
raveren revised this gist
Oct 2, 2021 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,6 +33,10 @@ # disable the weird fold on the bottom of the page and just display Kint where it was called. Kint\Renderer\RichRenderer::$folder = false; # make it usable on php frameworks of 2021+ Kint\Parser\BlacklistPlugin::$shallow_blacklist[] = 'Psr\\Containe\\ContainerInterface'; # Everywhere a file path is displayed you can click on it to open directly in PhpStorm # Requires plugin # Phpstorm -> Settings -> Plugins -> Marketplace -> Remote Call. -
raveren revised this gist
Oct 2, 2021 . 1 changed file with 1 addition and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -93,8 +93,4 @@ function sd() } Kint::$aliases[] = 'sd'; } -
raveren revised this gist
Oct 2, 2021 . 1 changed file with 7 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ <?php /* #################################################################### * Original, changes welcome: * * https://gist.github.com/raveren/eba373d8abb572b0528c73d145103f95 * @@ -36,7 +36,7 @@ # Everywhere a file path is displayed you can click on it to open directly in PhpStorm # Requires plugin # Phpstorm -> Settings -> Plugins -> Marketplace -> Remote Call. Kint\Kint::$file_link_format = 'phpstorm://open?file=%f&line=%l'; # show full (not edited) path to files so I can click em in console Kint\Kint::$app_root_dirs = [ @@ -93,4 +93,8 @@ function sd() } Kint::$aliases[] = 'sd'; } if (file_exists(__DIR__.'/../sandbox.php')) { require __DIR__.'/../sandbox.php'; } -
raveren revised this gist
Sep 25, 2021 . 1 changed file with 1 addition and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -93,8 +93,4 @@ function sd() } Kint::$aliases[] = 'sd'; } -
raveren revised this gist
Sep 25, 2021 . 1 changed file with 29 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ <?php /* #################################################################### * Original, please contribute your changes: * * https://gist.github.com/raveren/eba373d8abb572b0528c73d145103f95 * @@ -11,9 +11,9 @@ * * HOW TO USE? * * Add this file to the `autoload.files` configuration in composer.json: * * "autoload": { * "psr-4": { * "App\\": "src/" * }, @@ -53,28 +53,48 @@ function kd() { $args = func_get_args(); call_user_func_array(['Kint', 'dump'], $args); die; } Kint::$aliases[] = 'kd'; } if (! function_exists('ss')) { function ss() { if (! Kint::$enabled_mode) { return 0; } $stash = Kint::$enabled_mode; Kint::$enabled_mode = Kint::MODE_TEXT; $args = func_get_args(); $out = call_user_func_array(['Kint', 'dump'], $args); Kint::$enabled_mode = $stash; return $out; } Kint::$aliases[] = 'ss'; } if (!function_exists('sd')) { function sd() { $args = func_get_args(); call_user_func_array('ss', $args); die; } Kint::$aliases[] = 'sd'; } if (file_exists(__DIR__.'/../sandbox.php')) { require __DIR__.'/../sandbox.php'; } -
raveren revised this gist
May 23, 2021 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,9 +11,9 @@ * * HOW TO USE? * * Add this file to the `autoload-dev.files` configuration in composer.json: * * "autoload-dev": { * "psr-4": { * "App\\": "src/" * }, @@ -77,4 +77,4 @@ function sd() Kint::$aliases[] = 'sd'; } ################################## -
raveren revised this gist
Apr 23, 2021 . 1 changed file with 26 additions and 37 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,42 +1,50 @@ <?php /* #################################################################### * Original, changes welcome: * * https://gist.github.com/raveren/eba373d8abb572b0528c73d145103f95 * * More info: * * https://kint-php.github.io/kint/settings/ * * HOW TO USE? * * Add this file to the `autoload.files` configuration in composer.json: * * "autoload": { * "psr-4": { * "App\\": "src/" * }, * "files": [ * "config/kint.php" <--------------- this line * ] * }, * * Or, if you don't use Composer, just include this file anywhere after Kint is included. * ################################################################## */ # don't kill the vibe if something's wrong if (!class_exists('Kint\Renderer\RichRenderer')) { return; } # disable the weird fold on the bottom of the page and just display Kint where it was called. Kint\Renderer\RichRenderer::$folder = false; # Everywhere a file path is displayed you can click on it to open directly in PhpStorm # Requires plugin # Phpstorm -> Settings -> Plugins -> Marketplace -> Remote Call. Kint\Kint::$file_link_format = 'http://localhost:8091/?message=%f:%l'; # show full (not edited) path to files so I can click em in console Kint\Kint::$app_root_dirs = [ realpath($_SERVER['DOCUMENT_ROOT']) => realpath($_SERVER['DOCUMENT_ROOT']), ]; ################################## # add convenient shorthand aliases if (!function_exists('kd')) { /** * Alias of Kint::dump(); die; is compatible with symfony & laravel (it leaves their dd helper alone) @@ -69,23 +77,4 @@ function sd() Kint::$aliases[] = 'sd'; } ################################## -
raveren revised this gist
Apr 23, 2021 . 1 changed file with 15 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,25 +1,29 @@ <?php /** * Original, changes welcome: * * https://gist.github.com/raveren/eba373d8abb572b0528c73d145103f95 * * HOW TO USE? * * Add this file to the `autoload.files` configuration in composer.json: "autoload": { "psr-4": { "App\\": "src/" }, "files": [ "config/kint.php" <--------------- this line ] }, * * Or, if you don't use Composer, just include this file anywhere after Kint is included. */ if (!class_exists('Kint\Renderer\RichRenderer')) { return; } // disable the weird fold on the bottom of the page and just display Kint where it was called. Kint\Renderer\RichRenderer::$folder = false; // Next setting requires PhpStorm with https://plugins.jetbrains.com/plugin/6027-remote-call plugin - -
raveren revised this gist
Apr 21, 2021 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,10 @@ <?php /** * Original, changes welcome: * * https://gist.github.com/raveren/eba373d8abb572b0528c73d145103f95 * * HOW TO USE? * * Add this file to the `autoload.files` configuration in composer.json: -
raveren revised this gist
Jan 23, 2021 . 1 changed file with 14 additions and 14 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,27 +17,27 @@ */ // disable the weird fold on the bottom of the page and just display Kint where it was called. Kint\Renderer\RichRenderer::$folder = false; // Next setting requires PhpStorm with https://plugins.jetbrains.com/plugin/6027-remote-call plugin - // easiest way to install it is from phpstorm settings->plugins->market->search for Remote Call. // This makes it so if you have PhpStorm open, everywhere a file path is displayed you can click // on it and it will open in the PhpStorm IDE Kint\Kint::$file_link_format = 'http://localhost:8091/?message=%f:%l'; // show full (not edited) path to files so I can click em in console Kint\Kint::$app_root_dirs = [ realpath($_SERVER['DOCUMENT_ROOT']) => realpath($_SERVER['DOCUMENT_ROOT']), ]; // add convenient shorthand aliases if (!function_exists('kd')) { /** * Alias of Kint::dump(); die; is compatible with symfony & laravel (it leaves their dd helper alone) */ function kd() { $args = func_get_args(); call_user_func_array(array('Kint', 'dump'), $args); die; } @@ -46,23 +46,23 @@ function kd() } if (!function_exists('sd')) { /** * Alias of kd(), just outputs plain htmlescaped text. */ function sd() { $args = func_get_args(); call_user_func_array('s', $args); die; } Kint::$aliases[] = 'sd'; } if (!function_exists('ssd')) { /** * Alias of kd(), just returns simple text, no escapes, new lines are \n. * @@ -72,9 +72,9 @@ function ssd() { Kint::$enabled_mode = Kint::MODE_TEXT; $args = func_get_args(); call_user_func_array(array('Kint', 'dump'), $args); die; } -
raveren revised this gist
Jan 23, 2021 . 1 changed file with 12 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,26 +1,34 @@ <?php /** * HOW TO USE? * * Add this file to the `autoload.files` configuration in composer.json: "autoload": { "psr-4": { "App\\": "src/" }, "files": [ "config/kint.php" <--------------- this line ] }, * * Or, if you don't use Composer, just include this file anywhere after Kint is included. */ // disable the weird fold on the bottom of the page and just display Kint where it was called. \Kint\Renderer\RichRenderer::$folder = false; // Next setting requires PhpStorm with https://plugins.jetbrains.com/plugin/6027-remote-call plugin - // easiest way to install it is from phpstorm settings->plugins->market->search for Remote Call. // This makes it so if you have PhpStorm open, everywhere a file path is displayed you can click // on it and it will open in the PhpStorm IDE \Kint\Kint::$file_link_format = 'http://localhost:8091/?message=%f:%l'; // show full (not edited) path to files so I can click em in console \Kint\Kint::$app_root_dirs = [ \realpath($_SERVER['DOCUMENT_ROOT']) => \realpath($_SERVER['DOCUMENT_ROOT']), ]; // add convenient shorthand aliases if (!\function_exists('kd')) { /** * Alias of Kint::dump(); die; is compatible with symfony & laravel (it leaves their dd helper alone) -
raveren revised this gist
Jan 20, 2021 . 1 changed file with 0 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,4 @@ <?php /** * Add this file to the `autoload.files` configuration in composer.json: @@ -29,10 +28,6 @@ function kd() { $args = \func_get_args(); \call_user_func_array(array('\Kint', 'dump'), $args); -
raveren revised this gist
Jan 20, 2021 . 1 changed file with 13 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,22 +1,26 @@ <?php declare(strict_types=1); /** * Add this file to the `autoload.files` configuration in composer.json: "autoload": { "psr-4": { "App\\": "src/" }, "files": [ "config/kint.php" ] }, */ // hide the fold on the bottom of the page and just display Kint where it was called. \Kint\Renderer\RichRenderer::$folder = false; // next line requires PhpStorm with https://plugins.jetbrains.com/plugin/6027-remote-call plugin \Kint\Kint::$file_link_format = 'http://localhost:8091/?message=%f:%l'; // show full path to files so I can click em in console \Kint\Kint::$app_root_dirs = [ \realpath($_SERVER['DOCUMENT_ROOT']) => \realpath($_SERVER['DOCUMENT_ROOT']), ]; if (!\function_exists('kd')) { /** @@ -25,6 +29,10 @@ function kd() { $args = \func_get_args(); Kint::$enabled_mode = Kint::MODE_CLI; Kint::$cli_detection = false; Kint::$mode_default_cli = false; \call_user_func_array(array('\Kint', 'dump'), $args); @@ -55,7 +63,7 @@ function sd() /** * Alias of kd(), just returns simple text, no escapes, new lines are \n. * * Useful for cli when autodetection fails, logfiles and RESTful requests. */ function ssd() { -
raveren revised this gist
Jan 19, 2021 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ <?php /** * Add this file to the `autoload-dev.files` configuration in composer.json: "autoload-dev": { "psr-4": { "App\\": "src/" }, -
raveren revised this gist
Jan 19, 2021 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,6 +10,7 @@ "config/kint.php" ] }, * run `composer dump-autoload` or `composer update` after you do this. */ // hide the fold on the bottom of the page and just display Kint where it was called. -
raveren revised this gist
Jan 19, 2021 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,17 @@ <?php /** * Add this file to the `autoload.files` configuration in composer.json: "autoload": { "psr-4": { "App\\": "src/" }, "files": [ "config/kint.php" ] }, */ // hide the fold on the bottom of the page and just display Kint where it was called. \Kint\Renderer\RichRenderer::$folder = false; // next line requires PhpStorm with https://plugins.jetbrains.com/plugin/6027-remote-call plugin -
raveren revised this gist
Jan 15, 2021 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ <?php // hide the fold on the bottom of the page and just display Kint where it was called. \Kint\Renderer\RichRenderer::$folder = false; // next line requires PhpStorm with https://plugins.jetbrains.com/plugin/6027-remote-call plugin \Kint\Kint::$file_link_format = 'http://localhost:8091/?message=%f:%l'; -
raveren revised this gist
Jan 15, 2021 . No changes.There are no files selected for viewing
-
raveren created this gist
Jan 15, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,58 @@ <?php \Kint\Renderer\RichRenderer::$folder = false; // next line requires PhpStorm with https://plugins.jetbrains.com/plugin/6027-remote-call plugin \Kint\Kint::$file_link_format = 'http://localhost:8091/?message=%f:%l'; if (!\function_exists('kd')) { /** * Alias of Kint::dump(); die; is compatible with symfony & laravel (it leaves their dd helper alone) */ function kd() { $args = \func_get_args(); \call_user_func_array(array('\Kint', 'dump'), $args); die; } Kint::$aliases[] = 'kd'; } if (!\function_exists('sd')) { /** * Alias of kd(), just outputs plain htmlescaped text. */ function sd() { $args = \func_get_args(); \call_user_func_array('s', $args); die; } Kint::$aliases[] = 'sd'; } if (!\function_exists('ssd')) { /** * Alias of kd(), just returns simple text, no escapes, new lines are \n. * * Useful for cli when autodetection fails, logfiles and RESTful requests. */ function ssd() { Kint::$enabled_mode = Kint::MODE_TEXT; $args = \func_get_args(); \call_user_func_array(array('\Kint', 'dump'), $args); die; } Kint::$aliases[] = 'ssd'; }