Download the PHP package iviphp/debug without Composer

On this page you can find all versions of the php package iviphp/debug. 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 debug

Ivi Debug

Structured debugging, exception collection and development renderers for the IviPHP ecosystem.

iviphp/debug provides a framework-independent debugging foundation for collecting application messages, exceptions and custom diagnostic information.

It can render the collected information as HTML or JSON and register PHP error, exception and shutdown handlers.

Requirements

Installation

Features

Core concepts

Debug manager

DebugManager coordinates:

Debug API

Debug is the public application-facing wrapper around DebugManager.

Collector

A collector stores or generates one category of diagnostic information.

The package includes:

Applications may register their own collectors by implementing DebugCollectorInterface.

Handler

DebugHandler connects the debugging system to PHP's native error, exception and shutdown handling functions.

Renderer

The package includes two renderers:

Creating the debug service

The manager automatically registers a message collector and an exception collector.

Adding debug messages

Add contextual information:

The context must use string keys.

Message levels

The following levels are supported:

A custom level may be passed through message(), but it must be one of the supported levels.

Message categories

Categories can group related messages.

Retrieve messages by category:

Retrieve uncategorized messages:

Retrieving messages

Retrieve messages by level:

Determine whether the collector is empty:

Reset collected messages:

Sensitive context values

The message collector automatically redacts common sensitive keys.

Examples include:

Example:

The collected context contains:

Applications should still avoid sending secrets to the debugging system.

Configuring the message collector

When the configured limit is exceeded, the oldest messages are removed.

Capturing exceptions

Add safe contextual information:

Exception context values must be scalar or null.

Sensitive context keys are automatically redacted.

Exception information

The exception collector records:

Stack trace arguments are intentionally excluded.

Object properties and runtime resources are also excluded.

Retrieving exceptions

Retrieve exceptions by class:

Retrieve PHP errors by severity:

Reset collected exceptions:

Configuring the exception collector

Set includeTrace to false when stack traces should not be collected.

Collecting all debug information

The result is indexed by collector name.

By default, one failing collector does not stop other collectors.

The failed collector produces a safe error entry.

Enable strict collection when failures must be thrown:

Rendering HTML

Render collected information with an exception:

The HTML renderer generates a complete standalone development page containing:

The output escapes HTML values before rendering.

Rendering JSON

Render an exception as JSON:

Example structure:

Selecting a renderer dynamically

Unsupported formats throw DebugException.

Renderer content types

Returns:

Returns:

Configuring the HTML renderer

Long strings are truncated before rendering.

Deeply nested values are replaced with:

Configuring the JSON renderer

Disable formatted JSON:

Disable exception traces:

Replacing renderers

Retrieve the configured renderers:

Registering PHP handlers

Create and register the default handler:

This registers:

Check whether the handler is active:

Restore the previous PHP handlers:

Creating a handler without registering it

This is useful when the application controls exactly when handler registration occurs.

Error conversion

By default, supported PHP runtime errors are converted into ErrorException.

Disable conversion and collect errors directly:

When conversion is disabled, handled errors are captured by the exception collector.

Error reporting rules

The handler respects the current error_reporting() mask by default.

To process errors even when excluded from the current mask:

Suppressed errors should generally remain ignored in production applications.

Selecting handled error types

Use E_ALL to support all PHP error types:

Fatal shutdown errors

Fatal shutdown error capture is enabled by default.

Disable it when another system handles shutdown failures:

The handler may capture errors such as:

Custom exception reporter

A reporter runs after an uncaught exception has been captured.

A JSON reporter may be used for API applications:

Previous exception handlers

The previous exception handler is not called by default.

Enable propagation:

The exception is collected before the previous handler is called.

Custom collectors

Create a collector by implementing DebugCollectorInterface.

Register the collector:

Its output becomes available through:

Collector management

Determine whether a collector exists:

Return all collectors:

Return collector names:

Replace a collector:

Remove a custom collector:

The primary message and exception collectors cannot be removed.

Collection statistics

Return the total number of entries stored by all collectors:

Determine whether all collectors are empty:

Resetting collectors

Reset every registered collector:

By default, reset failures from individual collectors are ignored.

Use strict mode to throw failures:

Exceptions

Debugging-system failures are represented by:

Examples include:

Diagnostic context intentionally excludes collected payload contents and sensitive application values.

Development environment example

API environment example

Production usage

Detailed debug output should not be exposed publicly in production.

Production applications should:

The package limits and normalizes diagnostic values, but application-specific confidential data must still be handled carefully.

Design principles

iviphp/debug follows these principles:

License

Ivi Debug is open-source software released under the MIT License.

Maintainer

Maintained by Gaspard Kirira and Softadastra.


All versions of debug with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
iviphp/contracts Version ^0.1
iviphp/http Version ^0.1
iviphp/support Version ^0.1
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 iviphp/debug contains the following files

Loading the files please wait ...