bytic / debug
ByTIC debugging and error handling built on Symfony
Requires
- php: ^8.0
- bytic/package-base: ^1.0
- bytic/utility: ^1.0|^2.0
- filp/whoops: ^2.1
- symfony/error-handler: ^5.0 || ^6.0 || ^7.0 || ^8.0
Requires (Dev)
- phpunit/phpunit: ^9.6 || ^10.5 || ^11.5 || ^12.0
- symfony/config: ^5.3 || ^6.0 || ^7.0 || ^8.0
- symfony/dependency-injection: ^5.3 || ^6.0 || ^7.0 || ^8.0
Suggests
- symfony/dependency-injection: Load the optional Symfony service configuration (versions 5.3 through 8).
Provides
None
Conflicts
None
Replaces
None
README
ByTIC Debug component
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.