Download the PHP package tourze/backtrace-helper without Composer
On this page you can find all versions of the php package tourze/backtrace-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package backtrace-helper
Backtrace Helper
中文
[]
(https://packagist.org/packages/tourze/backtrace-helper)
[
]
(https://packagist.org/packages/tourze/backtrace-helper)
[
]
(https://packagist.org/packages/tourze/backtrace-helper)
[
]
(https://packagist.org/packages/tourze/backtrace-helper)
[
]
(https://codecov.io/gh/tourze/backtrace-helper)
A PHP package for enhanced backtrace handling and exception printing with useful context information, built on top of Spatie's backtrace library.
Table of Contents
- Features
- Installation
- Requirements
- Quick Start
- Basic Backtrace
- Exception Printing
- Context-Aware Exceptions
- Clean Proxy Class Names
- Advanced Usage
- Custom Log Data
- Production Environment Optimization
- Integration with Logging
- Testing
- Contributing
- Development Standards
- License
Features
- Enhanced Stack Traces: Clean and readable stack trace formatting with intelligent frame filtering
- Production-Ready: Automatic filtering of irrelevant stack frames in production environments (autoload, vendor internals)
- Exception Printing: Rich exception formatting with method arguments, file locations, and context
- Context-Aware Exceptions: Support for exceptions with contextual data through interfaces and traits
- Proxy Class Handling: Clean formatting for AOP and Doctrine proxy class names
- Zero Configuration: Works out of the box with sensible defaults
- PHP 8.1+ Support: Modern PHP features and type safety
Installation
Requirements
- PHP 8.1 or higher
- ext-mbstring
- spatie/backtrace ^1.7.1
- symfony/event-dispatcher ^6.4
- symfony/http-kernel ^6.4
Quick Start
Basic Backtrace
Exception Printing
Context-Aware Exceptions
Clean Proxy Class Names
Advanced Usage
Custom Log Data
Implement the LogDataInterface to provide custom log data for your objects:
Production Environment Optimization
The library automatically detects and filters unnecessary frames in production:
Integration with Logging
Testing
Run the test suite:
Run static analysis:
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -am 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development Standards
- Follow PSR-12 coding standards
- Write unit tests for new features
- Ensure all tests pass before submitting PR
- Keep documentation up to date
License
The MIT License (MIT). Please see License File for more information.
All versions of backtrace-helper with dependencies
ext-mbstring Version *
ext-pcre Version *
spatie/backtrace Version ^1.7.1
symfony/event-dispatcher Version ^7.3
symfony/http-kernel Version ^7.3