Search by

bytic / debug

gabrielsolomon

ByTIC debugging and error handling built on Symfony

Package info

github.com/bytic/debug

pkg:composer/bytic/debug

Statistics

Installs: 8 199

Dependents: 5

Suggesters: 0

Stars: 0

Open Issues: 0

2.0.4 2026-11-22 20:00 UTC

README

ByTIC Debug component

Latest Version on Packagist Latest Stable Version Latest Unstable Version

Software License Tests SensioLabsInsight Quality Score StyleCI Total Downloads

Installation and compatibility

composer require bytic/debug

The package keeps PHP 8.0 as its minimum and supports symfony/error-handler 5.x, 6.x, 7.x and 8.x. Composer selects a version compatible with your PHP runtime and other dependencies:

Symfony Minimum PHP
5.x 8.0 (this package's minimum)
6.x 8.1
7.x 8.2
8.x 8.4

Other dependencies may impose a higher PHP minimum; for example, recent ByTIC Container releases require PHP 8.1, while PHP 8.0 uses an older compatible 2.x release.

Existing ByTIC integration

Continue registering Nip\Debug\DebugServiceProvider as before. The shared debug and error-handler services are also available through both the Nip\Debug and Symfony\Component\ErrorHandler class names. The provider's boot() method installs the shared error handler.

Nip\Debug\Debug and Nip\Debug\ErrorHandler remain Symfony subclasses. Existing static calls, subclasses and renderable exceptions are unchanged. When a Symfony handler is already registered, the ByTIC provider continues reusing it rather than replacing it during service registration.

Symfony-style integration

For new code, prefer Symfony class names in constructor type hints. An optional PHP service configuration supports Symfony DependencyInjection 5.3 through 8:

composer require symfony/dependency-injection symfony/config

Import it from a Symfony application's config/services.php:

use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

return static function (ContainerConfigurator $container): void {
    $container->import('../vendor/bytic/debug/src/Resources/config/services.php');
};

The class-based services are private and available for autowiring; the legacy debug and error-handler aliases are public. All aliases resolve to shared instances. Importing or resolving services does not install global PHP handlers. In a standalone application, install the handler explicitly during bootstrap:

use Symfony\Component\ErrorHandler\ErrorHandler;

ErrorHandler::register($container->get('error-handler'));

In a full Symfony application, let the framework manage its own debug bootstrap; do not import this configuration if you already have equivalent services. This opt-in integration lays the groundwork for Symfony-style dependency injection without requiring a bundle or replacing the ByTIC provider.

Development

composer install
composer test

GitHub Actions exercises PHP 8.0 through 8.5 and Symfony 5.4, 6.4, 7.x and 8.x.