The VarDumper component provides mechanisms for walking through any arbitrary PHP variable. It provides a better dump() function that you can use instead of var_dump().

Overview
Comments
  • Mark iconv as a required PHP extension.

    Mark iconv as a required PHP extension.

    Var-dumper requires the iconv extension. I was using it on a freshly installed PHP instance and got the following fatal error:

    Error: Call to undefined function Symfony\Component\VarDumper\Dumper\iconv_strlen() in Symfony\Component\VarDumper\Dumper\CliDumper->dumpString() (line 172 of vendor/symfony/var-dumper/Dumper/CliDumper.php).

    opened by pfrenssen 3
  • added dd_if function

    added dd_if function

    We may want to see the output based on the conditions, so dd_if will make our job easier.

    $value = 1;
    $data = [1, 2, 3, 4, 5];
    
    dd_if(in_array($value, $data));
    
    
    opened by ahmetbarut 1
  • [VarDumper] Add FFI\CData and FFI\CType support

    [VarDumper] Add FFI\CData and FFI\CType support

    | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | yes | Deprecations? | no

    Added support of FFI:

    $ffi = \FFI::cdef(<<<'CPP'
        typedef struct { int x; int y; } Point;
        typedef struct Example {
            uint8_t array[32];
            long longVal;
            __extension__ union {
                __extension__ struct { short shortVal; };
                struct { Point point; float e; };
            };
            bool boolValue;
            int (*func)(struct __sub *h);
        } Example;
    CPP);
    
    $struct = $ffi->new('Example');
    $struct->func = (static fn (object $ptr) => 42);
    
    dump($struct);
    

    Before

    FFI\CData {#2}
    

    After

    FFI\CData<struct Example> size 64 align 8 {#2
      +array: FFI\CData<uint8_t[32]> size 32 align 1 {#18}
      +int32_t longVal: 0
      +int16_t shortVal: 0
      +point: FFI\CData<struct <anonymous>> size 8 align 4 {#17
        +int32_t x: 0
        +int32_t y: 0
      }
      +float e: 0.0
      +bool boolValue: false
      +func: [cdecl] callable(struct __sub*): int32_t {#20
        returnType: FFI\CType<int32_t> size 4 align 4 {#25}
      }
    }
    
    opened by SerafimArts 1
  • Adds ddc helper function

    Adds ddc helper function

    Adds ddc helper function as an exhaustive version of dump.

    ddc stands for: Die Dump Count

    There is a lot of time when the first call to the dd() is not what we want. on the other hand, dump() does not have a break and prints out much more than we want.

    This is something in between dd and dump. For example, we want to see what parameters are passed to a method, but that method is called multiple times and the first couple of calls does not matter to us. Or any other debug a process which involves a loop

    <?php
    
    $i = 0;
    while (true) {
        $i++;
        ddc(4, $i);         // dumps 1, 2, 3, 4 then dies
        ddc([0, 4], $i);    // same as ddc(4, $i); 
    }
    
    $i = 0;
    while (true) {
        $i++;
        ddc([2,4], $i);   // dumps 3, 4 (skips 1, 2)
    }
    
    opened by imanghafoori1 1
  • Display fully qualified title

    Display fully qualified title

    We can see the objects with namespace that help us to navigate to the file easily.

    Before: These are diffrent Collection class Screen Shot 2019-09-06 at 1 02 37 PM

    Now: we can see the diffrent Screen Shot 2019-09-06 at 1 02 20 PM

    opened by pavinthan 1
  • [HTMLDumper] Possibility to replace existing css style

    [HTMLDumper] Possibility to replace existing css style

    Possibility to replace existing css style for HTMLDumper without replacing the whole css class definition like changing background-color, font or word-break, etc

    e.g.

    $dumper->changeStyle('default', 'word-break', 'break-word') would change css style of word-break to break-word from break-all

    opened by faizanakram99 1
  • fix: First time dump method call not working issue

    fix: First time dump method call not working issue

    Calling the dump() method for the first time is not producing any output. That's because, in the latest change, the first call to the dump method is not calling the $handler at all. It's just setting the $handler. In this PR, I've tried to fix this issue.

    opened by me-shaon 1
  • ClassStub closure fix

    ClassStub closure fix

    If the ClassStub needs to work with a class closure, it will throw a FatalErrorException. I got this:

    FatalErrorExceptionError: __debuginfo() must return an array
    --
    in ClassStub.php line 56
    at ReflectionMethod->__construct('\'eZ\\\\Publish\\\\Core\\\\Base\\\\Container\\\\ApiLoader\\\\Storage\\\\ExternalStorageRegistryFactory\'', '\'eZ\\\\Publish\\\\Core\\\\Base\\\\Container\\\\ApiLoader\\\\Storage\\\\{closure}\'') in ClassStub.php line 56
    at ClassStub->__construct('identifier' => '\'eZ\\\\Publish\\\\Core\\\\Base\\\\Container\\\\ApiLoader\\\\Storage\\\\ExternalStorageRegistryFactory->eZ\\\\Publish\\\\Core\\\\Base\\\\Container\\\\ApiLoader\\\\Storage\\\\{closure}\'', 'callable' => '???') in ExceptionCaster.php line 163
    ...
    

    This bugfix handles this situation.

    opened by fchris82 1
  • No such return type void

    No such return type void

    The return type used here will throw an error:

    Fatal error: Uncaught TypeError: Return value of Symfony\Component\VarDumper\Dumper\ServerDumper::dump() must be an instance of Symfony\Component\VarDumper\Dumper\void, none returned
    

    This PR simply removes it.

    opened by phillipsharring 1
  • [bugfix] Make possible to create sync tcp-connection

    [bugfix] Make possible to create sync tcp-connection

    On some systems creating async TCP connection results in "failed to open stream: Resource temporarily unavailable" exception. To solve this, added VAR_DUMPER_ASYNC variable, which is true by default, so won't affect default behavior.

    If one faces "failed to open stream: Resource temporarily unavailable" error, he should add VAR_DUMPER_ASYNC=0 to .env file, and problem would be solved.

    opened by nikserg 1
Releases(v6.2.3)
  • v6.2.3(Dec 28, 2022)

  • v6.1.9(Dec 28, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v6.1.8...v6.1.9)

    • bug #48615 Fix getting the name of closures on PHP 8.1.11+ (nicolas-grekas)
    • bug #48359 Ignore \Error in __debugInfo() (fancyweb)
    Source code(tar.gz)
    Source code(zip)
  • v6.0.17(Dec 28, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v6.0.16...v6.0.17)

    • bug #48615 Fix getting the name of closures on PHP 8.1.11+ (nicolas-grekas)
    • bug #48359 Ignore \Error in __debugInfo() (fancyweb)
    Source code(tar.gz)
    Source code(zip)
  • v5.4.17(Dec 28, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v5.4.16...v5.4.17)

    • bug #48615 Fix getting the name of closures on PHP 8.1.11+ (nicolas-grekas)
    • bug #48359 Ignore \Error in __debugInfo() (fancyweb)
    Source code(tar.gz)
    Source code(zip)
  • v6.2.2(Dec 16, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v6.2.1...v6.2.2)

    • bug #48615 Fix getting the name of closures on PHP 8.1.11+ (nicolas-grekas)
    • bug #48359 Ignore \Error in __debugInfo() (fancyweb)
    Source code(tar.gz)
    Source code(zip)
  • v6.2.1(Dec 6, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v6.2.0...v6.2.1)

    • bug #48461 Fix possible memory-leak when using lazy-objects (nicolas-grekas)
    Source code(tar.gz)
    Source code(zip)
  • v6.2.0(Nov 30, 2022)

  • v6.2.0-RC2(Nov 28, 2022)

  • v6.2.0-RC1(Nov 25, 2022)

  • v6.2.0-BETA3(Nov 19, 2022)

  • v6.2.0-BETA1(Oct 24, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v6.1.6...v6.2.0-BETA1)

    • feature #47730 Ban DateTime from the codebase (WebMamba)
    • feature #38996 Remove the default values from setters with a nullable parameter (derrabus, nicolas-grekas)
    • feature #46773 Add FFI\CData and FFI\CType types (SerafimArts)
    Source code(tar.gz)
    Source code(zip)
  • v6.1.6(Oct 12, 2022)

  • v6.0.14(Oct 12, 2022)

  • v5.4.14(Oct 12, 2022)

  • v4.4.47(Oct 12, 2022)

  • v6.1.5(Sep 30, 2022)

  • v6.0.13(Sep 30, 2022)

  • v5.4.13(Sep 30, 2022)

  • v4.4.46(Sep 30, 2022)

  • v6.1.3(Jul 29, 2022)

  • v6.0.11(Jul 29, 2022)

  • v5.4.11(Jul 29, 2022)

  • v4.4.44(Jul 29, 2022)

  • v6.1.0(May 27, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v6.1.0-RC1...v6.1.0)

    • bug #46421 Deal with DatePeriod->include_end_date on PHP 8.2 (nicolas-grekas)
    Source code(tar.gz)
    Source code(zip)
  • v6.0.9(May 27, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v6.0.8...v6.0.9)

    • bug #46421 Deal with DatePeriod->include_end_date on PHP 8.2 (nicolas-grekas)
    • bug #46221 Fix html-encoding emojis (nicolas-grekas)
    Source code(tar.gz)
    Source code(zip)
  • v5.4.9(May 27, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v5.4.8...v5.4.9)

    • bug #46421 Deal with DatePeriod->include_end_date on PHP 8.2 (nicolas-grekas)
    • bug #46221 Fix html-encoding emojis (nicolas-grekas)
    Source code(tar.gz)
    Source code(zip)
  • v4.4.42(May 27, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v4.4.41...v4.4.42)

    • bug #46421 Deal with DatePeriod->include_end_date on PHP 8.2 (nicolas-grekas)
    • bug #46221 Fix html-encoding emojis (nicolas-grekas)
    Source code(tar.gz)
    Source code(zip)
  • v6.1.0-RC1(May 14, 2022)

  • v6.1.0-BETA2(Apr 27, 2022)

    Changelog (https://github.com/symfony/var-dumper/compare/v6.1.0-BETA1...v6.1.0-BETA2)

    • bug #46171 Fix dumping floats on PHP8 (nicolas-grekas)
    Source code(tar.gz)
    Source code(zip)
  • v6.0.8(Apr 27, 2022)

A better YAML configuration file management virion for PocketMine-MP 4

BetterConfig WARNING: This virion is under development and haven't been tested. Do not use this virion unless you know what you're doing. Contribution

KygekTeam International 1 Apr 30, 2022
This library can parse a TypeSchema specification either from a JSON file, or from PHP classes using reflection and annotations.

This library can parse a TypeSchema specification either from a JSON file, or from PHP classes using reflection and annotations. Based on this schema it can generate source code and transform raw JSON data into DTO objects. Through this you can work with fully typed objects in your API for incoming and outgoing data.

Apioo 54 Jul 14, 2022
A beautiful, fully open-source, tunneling service - written in pure PHP

Expose A completely open-source ngrok alternative - written in pure PHP. Documentation For installation instructions, in-depth usage and deployment de

Beyond Code 3.9k Dec 29, 2022
PHP client library for the Square Connect APIs

Square Connect PHP SDK - RETIRED replaced by square/square-php-sdk NOTICE: Square Connect PHP SDK retired The Square Connect PHP SDK is retired (EOL)

Square 113 Dec 30, 2022
A PHP parser for TOML

TOML parser for PHP A PHP parser for TOML compatible with TOML v0.4.0. Support: Installation Requires PHP >= 7.1. Use Composer to install this package

Yo! Symfony 175 Dec 26, 2022
Simple yet expressive schema-based configuration library for PHP apps

league/config helps you define nested configuration arrays with strict schemas and access configuration values with dot notation.

The League of Extraordinary Packages 282 Jan 6, 2023
LOAD is a PHP library for configuration loading to APCu

LOAD LOAD is a PHP library for configuration loading to APCu Sources Available sources for configuration loading are: PHP file Consul Environment vari

Beat Labs 4 Jan 18, 2022
An object-oriented option parser library for PHP, which supports type constraints, flag, multiple flag, multiple values, required value checking

GetOptionKit Code Quality Versions & Stats A powerful option parser toolkit for PHP, supporting type constraints, flag, multiple flag, multiple values

Yo-An Lin 140 Sep 28, 2022
Config is a file configuration loader that supports PHP, INI, XML, JSON, YML, Properties and serialized files and string

Config Config is a file configuration loader that supports PHP, INI, XML, JSON, YML, Properties and serialized files and strings. Requirements Config

Hassan Khan 946 Jan 1, 2023
The VarDumper component provides mechanisms for walking through any arbitrary PHP variable. It provides a better dump() function that you can use instead of var_dump().

VarDumper Component The VarDumper component provides mechanisms for walking through any arbitrary PHP variable. It provides a better dump() function t

Symfony 7.1k Jan 1, 2023
A Magento 2 module that adds a CLI bin/magento cms:dump to dump all CMS pages and CMS blocks to a folder var/cms-output.

A Magento 2 module that adds a CLI bin/magento cms:dump to dump all CMS pages and CMS blocks to a folder var/cms-output.

Yireo 16 Dec 16, 2022
DatabaseLog CakePHP plugin to log into DB instead of files. Better to filter and search.

CakePHP DatabaseLog Plugin DatabaseLog engine for CakePHP applications. This branch is for CakePHP 4.0+. See version map for details. Features Easy se

Mark Sch. 41 Jul 29, 2022
Making multiple identical function calls has the same effect as making a single function call.

Making multiple identical function calls has the same effect as making a single function call.

李铭昕 4 Oct 16, 2021
QPM, the process management framework in PHP, the efficient toolkit for CLI development. QPM provides basic daemon functions and supervision mechanisms to simplify multi-process app dev.

QPM QPM全名是 Quick(or Q's) Process Management Framework for PHP. PHP 是强大的web开发语言,以至于大家常常忘记PHP 可以用来开发健壮的命令行(CLI)程序以至于daemon程序。 而编写daemon程序免不了与各种进程管理打交道。Q

Comos 75 Dec 21, 2021
Connect and work with MySQL/MariaDB database through MySQLi in PHP. This is an introductory project, If you need a simple and straightforward example that takes you straight to the point, you can check out these examples.

First MySQLi PHP Connect and work with MySQL/MariaDB database through MySQLi in PHP. The above exercises are designed for students. This is an introdu

Max Base 4 Feb 22, 2022
PHP application-level database locking mechanisms to implement concurrency control patterns.

PHP DB Locker Introduction PHP application-level database locking mechanisms to implement concurrency control patterns. Supported drivers: Postgres In

cybercog 3 Sep 29, 2022
Automattic 10.7k Jan 2, 2023
Track any ip address with IP-Tracer. IP-Tracer is developed for Linux and Termux. you can retrieve any ip address information using IP-Tracer.

IP-Tracer is used to track an ip address. IP-Tracer is developed for Termux and Linux based systems. you can easily retrieve ip address information using IP-Tracer. IP-Tracer use ip-api to track ip address.

Rajkumar Dusad 1.2k Jan 4, 2023
Laravel package to search through multiple Eloquent models. Supports sorting, pagination, scoped queries, eager load relationships and searching through single or multiple columns.

Laravel Cross Eloquent Search This Laravel package allows you to search through multiple Eloquent models. It supports sorting, pagination, scoped quer

Protone Media 844 Dec 25, 2022