Download the PHP package decodelabs/glitch without Composer

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

Glitch

PHP from Packagist Latest Version Total Downloads GitHub Workflow Status PHPStan License

Better tools for when things go wrong

Glitch is a standalone PHP package designed to dramatically improve error handling and inspection when developing your applications.

The project aims to provide deep data inspection tools and an Exception handling interface.

Get news and updates on the DecodeLabs blog.


Installation

Glitch should be installed via composer

Usage

Glitch uses Veneer with its frontage registered at DecodeLabs\Glitch. You can access all of the primary functionality through this frontage:

Setup

Otherwise, Glitch works out of the box without any special setup. There are however some optional steps you can take to customise operation.

Register as the default error handler:

Register base path aliases for easier reading of file names in dumps:

Pass the microtime() of initial app launch for timing purposes:

Set run mode (development | testing | production) so Glitch can format output correctly:

Dumps

Dump anything and everything easily, using simple global functions. The functions mirror those used in Symfony/VarDumper, maintaining compatibility by using Symfony's VarDumper interface if it is already loaded.

You can also mark functions as incomplete whilst in development:

Renderers

The resulting dump UI (when using the HTML renderer, the default option) is injected into an iframe at runtime so can be rendered into any HTML page without breaking anything. If the page is otherwise empty, the iframe will expand to fill the viewport if possible.

The dump output is rendered by an instance of DecodeLabs\Glitch\Renderer which can be overridden on the default Context at startup. The Html renderer is loaded under http sapi, the Cli renderer is used when under the CLI sapi.

Custom renderers may convert Entities to other output formats depending on where they should be sent, such as Xml or Json for example.

Custom colours

The HTML renderer uses css variables to style individual element colours and can be overridden with custom values. Create a custom css file with variable overrides:

See colours.scss for all of the current colour override options.

Then load the file into the HTML renderer:

Transports

Once rendered, the dump information is delivered via an instance of DecodeLabs\Glitch\Transport, also overridable on the default Context. It is the responsibility of the Transport to deliver the rendered dump.

By default, the render is just echoed out to STDOUT, however custom transports may send information to other interfaces, browser extensions, logging systems, etc.

Custom dumps

You can customise how your own class instances are dumped by implementing DecodeLabs\Glitch\Dumpable and / or providing a glitchDump method. The method should either yield or return a list of key / value pairs that populate the requisite fields of the dumper entity.

The Dumpable interface is NOT required - Glitch will check for the existence of the method regardless, which is useful if you do not want to rely on a dependency on the Glitch library just to provide better dump handling.

However, the Dumpable interface is provided by glitch-support package which contains only the bear essentials for libraries to provide support to Glitch without including the entire library as a dependency.

Licensing

Glitch is licensed under the MIT License. See LICENSE for the full license text.


All versions of glitch with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
symfony/polyfill-mbstring Version ^1.7
symfony/polyfill-php82 Version ^1.29
decodelabs/coercion Version ^0.2
decodelabs/enlighten Version ^0.9
decodelabs/exceptional Version ^0.4.1
decodelabs/glitch-support Version ^0.4.6
decodelabs/veneer Version ^0.11.1
psr/log Version ^3.0
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 decodelabs/glitch contains the following files

Loading the files please wait ....