Download the PHP package berbeflo/modify-dump without Composer

On this page you can find all versions of the php package berbeflo/modify-dump. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package modify-dump

1. Modify Dump

Enables easy modification of var_dump output with Attributes, that were introduced in PHP 8.

1.1. Motivation

I just wanted to play around with Attributes and this library was the first use-case that came into mind.

1.2. How it works

PHP has a bunch of so called magic methods. These are object (or class) methods that get called under certain circumstances. Most of the time you'll come into touch with __construct(), which is called on object instantiation.
One of the less known magic methods is __debugInfo() which is called on calling var_dump() on an object.
This library provides a Trait that overrides __debugInfo() and makes some magic based on the Attributes for the class and it's properties.

1.3. Usage

1.3.1. Installation

composer require berbeflo/modify-dump

1.3.2. First example

Use the Trait ModifiedDump and tell it which properties to show:

The corresponding output:

1.3.3. Further examples

Have a look at the examples folder!

1.4. Features

1.4.1. Filters

Filters allow to exclude properties, e.g. private properties without the burden to mark every property that should not be returned.
The default filter excludes all properties that have no Dump Attribute.

1.4.2. Formatters

Formatters allow to modify the displayed content of a property.

1.4.3. Statistics

Statistics allow to add class/object statistics to the output.

1.4.4. Extendibility

It's easy to add new Formatters, Filters and Statistics.

1.4.5. Not restricted to var_dump

While the delivered trait overrides __debugInfo(), the logic is decoupled from this method. So it'd be easy to use this library to e.g. write a simple toArray() method.

2. Navigation


All versions of modify-dump with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package berbeflo/modify-dump contains the following files

Loading the files please wait ....