PHPackages                             fishingboy/madump - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fishingboy/madump

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fishingboy/madump
=================

Magento Data Object Dump Tool

1.1.3(4y ago)055[3 issues](https://github.com/fishingboy/MaDump/issues)MITPHPCI passing

Since Sep 9Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/fishingboy/MaDump)[ Packagist](https://packagist.org/packages/fishingboy/madump)[ RSS](/packages/fishingboy-madump/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (10)Dependencies (1)Versions (14)Used By (0)

MaDump
======

[](#madump)

[![Tests](https://github.com/fishingboy/MaDump/actions/workflows/tests.yml/badge.svg)](https://github.com/fishingboy/MaDump/actions/workflows/tests.yml)[![Packagist Version](https://camo.githubusercontent.com/e5b974550a1b3da9c34f93a44044ce92a95dde99ab720b0205a520f9fa195b73/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66697368696e67626f792f6d6164756d702e737667)](https://packagist.org/packages/fishingboy/madump)[![Downloads](https://camo.githubusercontent.com/3acebdf80da7ae8934c085e6cca6f76fc7f4ae532dcbb957f215b9ca54c9aeac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f66697368696e67626f792f6d6164756d702e7376673f6c6162656c3d446f776e6c6f616473)](https://packagist.org/packages/fishingboy/madump)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](LICENSE)

English | [繁體中文](README-zh.md)

Why MaDump?
-----------

[](#why-madump)

Calling `var_dump()` or `print_r()` on a Magento object causes an out-of-memory error because of deeply nested circular references. MaDump dumps only the first level of an object, giving you just enough information to navigate the code during development.

Installation
------------

[](#installation)

```
composer require fishingboy/madump
```

Usage
-----

[](#usage)

1. Print directly

    ```
    use Fishingboy\MaDump\MaDump;
    MaDump::dump($product);
    ```

    Output:

    ```

    Magento\Catalog\Model\Product\Interceptor
        ->addAttributeUpdate($code, $value, $store)
        ->addCustomOption($code, $value, $product)
        ->addData(array $arr)
        ->addImageToMediaGallery($file, $mediaAttribute, $move, $exclude)
        ->addOption(Magento\Catalog\Model\Product\Option $option)
        ->afterCommitCallback()
        ->afterDelete()
        ->afterDeleteCommit()
        ->formatUrlKey($str)
        ->fromArray(array $data)
        ->getAttributeDefaultValue($attributeCode)
        ->getAttributeSetId() : 16 (string)
        ->getAttributeText($attributeCode)
        ->getAttributes($groupId, $skipSuper)
        ->getAvailableInCategories() : array
        ->getCacheIdTags() : array
        ->getCacheTags() : array
        ->getCalculatedFinalPrice() :  (NULL)
        ->getCategory() :  (NULL)
        ->getCategoryCollection() : Magento\Catalog\Model\ResourceModel\Category\Collection\Interceptor
        ...

    ```
2. Capture as a string (for logging)

    ```
    use Fishingboy\MaDump\MaDump;
    $product_dump = MaDump::dump($product, true);
    $this->_logger->info("product => " . $product_dump);
    ```
3. Stop execution after dumping

    ```
    use Fishingboy\MaDump\MaDump;
    MaDump::dump($product);
    exit;
    ```
4. Typical trace workflow

    Step 1 — dump the top-level object:

    ```
    MaDump::dump($product);
    ```

    Step 2 — drill into an attribute:

    ```
    MaDump::dump($product->getCustomAttributes());
    ```

    Step 3 — drill further:

    ```
    MaDump::dump($product->getCustomAttributes()[0]);
    ```

    Keep going level by level until you find what you need.

Output Format
-------------

[](#output-format)

1. Object

    ```

    Magento\Catalog\Model\Product\Interceptor
        ->addAttributeUpdate($code, $value, $store)
        ->addCustomOption($code, $value, $product)
        ->addData(array $arr)
        ->addImageToMediaGallery($file, $mediaAttribute, $move, $exclude)
        ->addOption(Magento\Catalog\Model\Product\Option $option)
        ->afterCommitCallback()
        ->afterDelete()
        ->afterDeleteCommit()
        ->formatUrlKey($str)
        ->fromArray(array $data)
        ->getAttributeDefaultValue($attributeCode)
        ->getAttributeSetId() : 16 (string)
        ->getAttributeText($attributeCode)
        ->getAttributes($groupId, $skipSuper)
        ->getAvailableInCategories() : array
        ->getCacheIdTags() : array
        ->getCacheTags() : array
        ->getCalculatedFinalPrice() :  (NULL)
        ->getCategory() :  (NULL)
        ->getCategoryCollection() : Magento\Catalog\Model\ResourceModel\Category\Collection\Interceptor
        ...

    ```

    Zero-argument getter methods are called automatically and their return values are shown inline:

    ```
        ->getAttributeSetId() : 16 (string)
        ->getCategoryCollection() : Magento\Catalog\Model\ResourceModel\Category\Collection\Interceptor
        ->getCacheIdTags() : array
    ```
2. Array

    ```

    Array(52) =>
    [0] => (Magento\Framework\Api\AttributeValue)
    [10] => (Magento\Framework\Api\AttributeValue)
    [11] => (Magento\Framework\Api\AttributeValue)
    [12] => (Magento\Framework\Api\AttributeValue)
    ...

    ```

    Or for a simple array:

    ```

    Array(2) =>
    [0] => 101
    [1] => 102

    ```
3. Scalar value

    ```
    1 (integer)
    ```

    ```
    true (boolean)
    ```

    ```
    sku-123 (string)
    ```

License
-------

[](#license)

This project is licensed under the [MIT License](LICENSE).

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance61

Regular maintenance activity

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~16 days

Recently: every ~0 days

Total

13

Last Release

1563d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/45bf9bc379ef669c12d4f474f48d65b40cc371652e668ec213954817a048309d?d=identicon)[fishingboy](/maintainers/fishingboy)

---

Top Contributors

[![fishingboy](https://avatars.githubusercontent.com/u/4921524?v=4)](https://github.com/fishingboy "fishingboy (59 commits)")

---

Tags

magentovar\_dumpdd

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fishingboy-madump/health.svg)

```
[![Health](https://phpackages.com/badges/fishingboy-madump/health.svg)](https://phpackages.com/packages/fishingboy-madump)
```

###  Alternatives

[mage2tv/magento-cache-clean

This package has been migrated to mage-os/magento-cache-clean. Please switch over at your convenience.

5442.1M3](/packages/mage2tv-magento-cache-clean)[magento/magento-composer-installer

Composer installer for Magento modules

7524.2M350](/packages/magento-magento-composer-installer)[yireo/magento2-webp2

Magento 2 module to add WebP support to the Magento frontend

2111.3M7](/packages/yireo-magento2-webp2)[magento-hackathon/magento-composer-installer

Composer installer for Magento modules

214795.3k383](/packages/magento-hackathon-magento-composer-installer)[yireo/magento2-googletagmanager2

Add Google Tag Manager to Magento

1681.0M5](/packages/yireo-magento2-googletagmanager2)[chevere/var-dump

A multi-purpose colorful modern alternative to var\_dump

3845.1k17](/packages/chevere-var-dump)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
