PHP 5.3+ Extensible Dumper

Overview

Ladybug: PHP 5.3+ Extensible Dumper

Build Status Latest Stable Version Total Downloads Latest Unstable Version

Scrutinizer Quality Score Code Coverage

Ladybug provides an easy and extensible var_dump / print_r replacement for PHP 5.3+ projects. Any PHP variable, object or resource can be dumped to beautiful representation:

<?php
$var = array(
    array(
        'name' => 'Raul',
        'age' => 29
    ),
    array(
        'name' => 'John',
        'age' => 27
    )
);

ladybug_dump($var)

Documentation

  1. Examples.
  2. Usage.
  3. Installation.
  4. Extending.
  5. Reference.
  6. Tests.

Support for other libraries/frameworks

Credits

License

Ladybug is released under the MIT License. See the bundled LICENSE file for details.

Comments
  • Added backtrace information

    Added backtrace information

    This is useful when you have put several calls of ldd, so you can easily remove them without searching on your project where. (if you have closed the file or you made a debug session with lots of calls in many files)

    opened by COil 9
  • Not loading modern theme

    Not loading modern theme

    Hi to all,

    I've downloaded master and 1.0.11, and it doesn't load modern theme, just the basic styles. I've searched on the docs and googled about the issue, without results, just one drupal user describing the same issue here: https://www.drupal.org/node/2383765

    opened by blitux 5
  • Show File and Line

    Show File and Line

    Exists any option or configuration for ldd to show me in the output the file and the line of the call?

    For example, i created a elisp function for mi emacs to print this data

    (defun ldd (var)
      "print-a-ldd-var-dump"
      (interactive "sVar:")
      (setq init-point (point))
      (insert (concat "echo 'Ladybug Dump Die (ldd) in " (file-name-base) " " (what-line) "';\n"))
      (insert (concat "ldd(" var  ");\n"))
      (indent-region init-point (point))
    )
    

    But is more dificult execute the emacs function than write ldd() in the code.

    opened by mgallego 5
  • iframe container shrinks when you toggle accordians

    iframe container shrinks when you toggle accordians

    If I open and then close an accordion, the iframe container shrinks. I've tried in both Chrome (30.0.1599.69) and IE10.

    I've rectified the problem temporarily by disabling width adjustment in the resizeIframe function in \ladybug\src\Ladybug\Theme\Base\View\Html\iframe.html.twig. I also set the width of the iframe to 100%, which I prefer anyway.

    opened by mickrip 4
  • Attempted to call an undefined method named

    Attempted to call an undefined method named "getShortDescription" of class "phpDocumentor\Reflection\DocBlock". Did you mean to call "getDescription"?

    SF 2.8.7

    today got this error

    Attempted to call an undefined method named "getShortDescription" of class "phpDocumentor\Reflection\DocBlock".
    

    Did you mean to call "getDescription"?

    on every kind of log

    ld($form->handleRequest($request));
    
    opened by ibasaw 3
  • composer-plugin-api not found

    composer-plugin-api not found

    i second that last related issue. i use arch linux, my composer version is in alpha state i believe. any suggestions? https://aur.archlinux.org/packages/php-composer/ im at php-composer 1.0.0_alpha7-2

    $ composer update Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.

    Problem 1 - raulfraile/ladybug-installer v1.0.1 requires composer-plugin-api * -> no matching package found. - raulfraile/ladybug-installer v1.0.0 requires composer-plugin-api * -> no matching package found. - raulfraile/ladybug-bundle v1.0.0 requires raulfraile/ladybug-plugin-symfony2 dev-master -> no matching package found. - symfony/framework-standard-edition 2.3.x-dev requires raulfraile/ladybug-bundle ~1.0 -> satisfiable by raulfraile/ladybug-bundle[v1.0.0, v1.0.1, v1.0.2]. - raulfraile/ladybug-bundle v1.0.1 requires raulfraile/ladybug-plugin-symfony2 ~1.0.0 -> satisfiable by raulfraile/ladybug-plugin-symfony2[v1.0.0, v1.0.1]. - raulfraile/ladybug-bundle v1.0.2 requires raulfraile/ladybug-plugin-symfony2 ~1.0.0 -> satisfiable by raulfraile/ladybug-plugin-symfony2[v1.0.0, v1.0.1]. - raulfraile/ladybug-plugin-symfony2 v1.0.0 requires raulfraile/ladybug-installer ~1.0.0 -> satisfiable by raulfraile/ladybug-installer[v1.0.0, v1.0.1]. - raulfraile/ladybug-plugin-symfony2 v1.0.1 requires raulfraile/ladybug-installer ~1.0.0 -> satisfiable by raulfraile/ladybug-installer[v1.0.0, v1.0.1]. - Installation request for symfony/framework-standard-edition 2.3.x-dev -> satisfiable by symfony/framework-standard-edition[2.3.x-dev].

    Potential causes:

    • A typo in the package name
    • The package is not available in a stable-enough version according to your minimum-stability setting see https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion for more details.

    Read http://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

    opened by brian-lamb-software-engineer 3
  • Fatal error: Can't inherit abstract function

    Fatal error: Can't inherit abstract function

    I am getting a fatal error using ladybug:

    Fatal error: Can't inherit abstract function Ladybug\Type\TypeInterface::setLevel() (previously declared abstract in Ladybug\Type\ExtendedTypeInterface) in /opt/www/sites/sander/ncv/vendor/raulfraile/ladybug-themes/Ladybug/Plugin/Extra/Type/AbstractType.php on line 18

    I am using PHP 5.3.3 (Debian Squeeze)

    opened by sandermarechal 3
  • is_resource is unreliable

    is_resource is unreliable

    In Ladybug\Type\FactoryType on line 63 the variable is checked using is_resource. This is unreliable. I was trying to dump a Guzzle error and I ran into this bug:

    http://www.php.net/manual/en/function.is-resource.php#103942

    Here, is_resource returns false for something that actually is a resource, jusr of an unknon type. As a consequence, I get a fatal error from Ladybug on line 68 where it tries to call $result->load because $result is still NULL.

    opened by sandermarechal 3
  • Unknown

    Unknown "render_type" function in layout.html.twig at line 29.

    It seems that commit c6d86d7f2081e5fc730887818aabab1d8e175acb introduced a bug causing fatal errors when trying to use ladybug:

    Unknown "render_type" function in layout.html.twig at line 29.
    

    I think that Twig_SimpleFunction takes the user-side function name as first parameter, and that keys are ignored in the array returned by getFunctions().

    opened by arnaud-lb 2
  • Configure the depth of dump ?

    Configure the depth of dump ?

    When ladybug dumps an object instance property it only prints the object class name.

    Is there a way to increase the depth of the dumps to show more about the subobjetcs ?

    opened by gsouf 2
  • Invalid argument supplied for foreach()

    Invalid argument supplied for foreach()

    Got the following error...

    Warning: Invalid argument supplied for foreach() in .. /vendor/raulfraile/ladybug/src/Ladybug/Inspector/InspectorManager.php line 35
    

    ....while doing a ladybug dump on any objects. I have taken the following example:

    use Symfony\Bundle\FrameworkBundle\Controller\Controller;
    use Symfony\Component\HttpFoundation\Request;
    
    class DemoController extends Controller
    {
        public function indexAction(Request $request)
        {
            ladybug_dump_die($request);
            //...
       }
    
    opened by Sydney-o9 2
  • Attempted to load class

    Attempted to load class "Twig_Filter_Method" from the global namespace. Did you forget a "use" statement?

    I see that Ladybug still doesn't support Twig 2.0 which causes the following problem

    Attempted to load class "Twig_Filter_Method" from the global namespace. Did you forget a "use" statement?

    As Symfony 3.x is now being used along with PHP7.x frequently, I assume ladybug will support Twig 2.0 soon?

    opened by mehmetsen80 0
  •  The Twig_Filter_Method class is deprecated since version 1.12

    The Twig_Filter_Method class is deprecated since version 1.12

    The current stable version of Twig is v1.22.3, you have requirement for twig as >=1.7.0. The latest version has deprecated function that you use and therefor we get USER_DEPRECATED warning.

    The full error message: The Twig_Filter_Method class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFilter instead

    opened by DmitryKmita 1
  • false behavior when clicking on first object in array

    false behavior when clicking on first object in array

    I dumped object which contains array of objects using function ld(). If I try to click on first object in array it doesnt shows information about object, but hides whole information about array.

    Example: Object -> Array -> Object1 - click here -> Object2 -> Object3

    Expected behavior: Object -> Array -> Object1 -> object information -> Object2 -> Object3 Real behaviour: Object -> Array

    I am calling ladybug_set_option('object_max_nesting_level', 5); before dump call.

    Browser: Firefox 34

    opened by krhovjak 0
  • problem character for windows console

    problem character for windows console

    ┬À this gets printed in a windows console instead of · for https://github.com/raulfraile/ladybug/blob/master/src/Ladybug/Theme/Simple/SimpleTheme.php

    Fix: '<f_tab> '.chr(250).' </f_tab>'

    Related: http://stackoverflow.com/questions/388490/unicode-characters-in-windows-command-line-how

    Note there are serious implementation bugs in Windows's code page 65001 support which will break many applications that rely on the C standard library IO methods, so this is very fragile. (Batch files also just stop working in 65001.) Unfortunately UTF-8 is a second-class citizen in Windows.

    opened by flip111 0
  • DateTime parameters are not dumped since mockery upgrade

    DateTime parameters are not dumped since mockery upgrade

    After upgrading Ladybug from v1.0.8 to v1.0.11 the parameters of a \DateTime() object are not dumped anymore. Reverting composer.lock to the Ladybug version from "2013-10-15 09:36:24" does show the parameters ( date, timezone_type, timezone) again.

    Gist of the composer.lock can be found here https://gist.github.com/Rvanlaak/d0c4c24cd8ad18e4b2bd

    opened by rvanlaak 2
Releases(v1.0.13)
Owner
Raul Fraile
Raul Fraile
A simple but extensible economy engine for PocketMine-MP, using label-oriented APIs.

Capital A simple but very extensible economy plugin for PocketMine-MP. How is Capital different from other economy plugins? Capital introduces a label

Jonathan Chan Kwan Yin 37 Dec 19, 2022
Zem contact reborn - An extensible HTML form mailer plugin for Textpattern CMS.

com_connect Contents Introduction Installing and upgrading Migrating from zem_contact_reborn Usage Tags com_connect tag com_connect_text tag com_conne

Textpattern CMS 23 Dec 8, 2021
The Current US Version of PHP-Nuke Evolution Xtreme v3.0.1b-beta often known as Nuke-Evolution Xtreme. This is a hardened version of PHP-Nuke and is secure and safe. We are currently porting Xtreme over to PHP 8.0.3

2021 Nightly Builds Repository PHP-Nuke Evolution Xtreme Developers TheGhost - Ernest Allen Buffington (Lead Developer) SeaBeast08 - Sebastian Scott B

Ernest Buffington 7 Aug 28, 2022
A sampling profiler for PHP written in PHP, which reads information about running PHP VM from outside of the process.

Reli Reli is a sampling profiler (or a VM state inspector) written in PHP. It can read information about running PHP script from outside of the proces

null 272 Dec 22, 2022
PHP Meminfo is a PHP extension that gives you insights on the PHP memory content

MEMINFO PHP Meminfo is a PHP extension that gives you insights on the PHP memory content. Its main goal is to help you understand memory leaks: by loo

Benoit Jacquemont 994 Dec 29, 2022
A sampling profiler for PHP written in PHP, which reads information about running PHP VM from outside of the process.

Reli Reli is a sampling profiler (or a VM state inspector) written in PHP. It can read information about running PHP script from outside of the proces

null 258 Sep 15, 2022
A multithreaded application server for PHP, written in PHP.

appserver.io, a PHP application server This is the main repository for the appserver.io project. What is appserver.io appserver.io is a multithreaded

appserver.io 951 Dec 25, 2022
Easy to use utility functions for everyday PHP projects. This is a port of the Lodash JS library to PHP

Lodash-PHP Lodash-PHP is a port of the Lodash JS library to PHP. It is a set of easy to use utility functions for everyday PHP projects. Lodash-PHP tr

Lodash PHP 474 Dec 31, 2022
A PHP 5.3+ and PHP 7.3 framework for OpenGraph Protocol

Opengraph Test with Atoum cd Opengraph/ curl -s https://getcomposer.org/installer | php php composer.phar install --dev ./vendor/atoum/atoum/bin/atoum

Axel Etcheverry 89 Dec 27, 2022
A status monitor for Elite Dangerous, written in PHP. Designed for 1080p screens in the four-panel-view in panel.php, and for 7 inch screens with a resolution of 1024x600 connected to a Raspberry Pi.

EDStatusPanel A status monitor for Elite Dangerous, written in PHP. Designed for 1080p screens in the four-panel-view in panel.php, and for 7 inch scr

marcus-s 24 Oct 4, 2022
🐘 A probe program for PHP environment (一款精美的 PHP 探針, 又名X探針、劉海探針)

Simplified Chinese | 简体中文 Traditional Chinese(Taiwan) | 正體中文(臺灣) Traditional Chinese(Hong Kong) | 正體中文(香港) Japanese | 日本語 ?? X Prober This is a probe

Km.Van 1.2k Dec 28, 2022
PHP Text Analysis is a library for performing Information Retrieval (IR) and Natural Language Processing (NLP) tasks using the PHP language

php-text-analysis PHP Text Analysis is a library for performing Information Retrieval (IR) and Natural Language Processing (NLP) tasks using the PHP l

null 464 Dec 28, 2022
PHP generics written in PHP

PHP generics written in PHP Require PHP >= 7.4 Composer (PSR-4 Autoload) Table of contents How it works Quick start Example Features Tests How it work

Anton Sukhachev 173 Dec 30, 2022
PHP exercises from my course at ETEC and some of my own play-around with PHP

etec-php-exercises PHP exercises from my course at ETEC and some of my own play-around with PHP Translations: Português (BR) Projects Project Descript

Luis Felipe Santos do Nascimento 6 May 3, 2022
GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.

GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.

Shivam Mathur 2.4k Jan 6, 2023
php-echarts is a php library for the echarts 5.0.

php-echarts 一款支持Apache EChart5.0+图表的php开发库 优先ThinkPHP5/6的开发及测试。 Apache EChart5.0已经最新发布,在视觉效果、动画效果和大数据展示方面已经远超之前的版本; 故不考虑EChart5.0之前版本的兼容问题;建议直接尝试5.0+

youyiio 5 Aug 15, 2022
Minimalist PHP frame for Core-Library, for Developing PHP application that gives you the full control of your application.

LazyPHP lightweight Pre-Made Frame for Core-library Install Run the below command in your terminal $ composer create-project ryzen/lazyphp my-first-pr

Ry-Zen 7 Aug 21, 2022
Zilliqa PHP is a typed PHP-7.1+ interface to Zilliqa JSON-RPC API.

Zilliqa PHP is a typed PHP-7.1+ interface to Zilliqa JSON-RPC API. Check out the latest API documentation. Add library in a composer.json file.

Patrick Falize 6 Oct 7, 2021
churn-php is a package that helps you identify php files in your project that could be good candidates for refactoring

churn-php Helps discover good candidates for refactoring. Table of Contents What Is it? Compatibility How to Install? How to Use? How to Configure? Si

Bill Mitchell 1.3k Dec 22, 2022