Repository navigation
Releases: LoggerEssentials/ErrorHandling
Releases · LoggerEssentials/ErrorHandling
Release list
Respect Suppressed Error Levels
Fixed
- Respect the active
error_reporting()mask when converting PHP errors into exceptions. - Prevent errors suppressed with
@from being converted intoErrorExceptioninstances on PHP 8+. - Preserve exception conversion for visible error levels included in the configured bitmask.
Tests
- Added regression coverage for suppressed error levels.
- Updated existing error-handler tests for the corrected behavior.
Fixed PHP 8.3+ Deprecation: Modernize Assertion Handler
Modernizes assertion handling to eliminate deprecation warnings in PHP 8.3+ and newer versions. The deprecated assert_options function and its constants ASSERT_ACTIVE, ASSERT_WARNING, and ASSERT_CALLBACK have been replaced with a modern exception-based approach using set_exception_handler to catch AssertionError exceptions. Failed assertions are now logged through the registered PSR-3 logger while maintaining full backward compatibility with existing code. Tests have been updated to verify the new implementation in isolated processes.
Finalized 1.0
- Updated codebase for PHP 8 compatibility, including stricter type definitions and nullable return types in error handlers.
- Replaced
Exceptiontype hints withThrowableto correctly capture all errors and exceptions in modern PHP environments. - Refactored error bitmask handling to remove deprecated syntax and ensure correct error suppression logic.
- Improved fatal error detection logic in shutdown handlers.
- Added PHPStan and Rector configuration for static analysis and automated code quality improvements.
- Updated
composer.jsonrequirements to PHP 8.0+.
Min php version is now at 7.0 + better exception handling
- Better exception-handling - Raised minimum php version to 7.0
Fixed an error
Fixed: Trying to access array offset on value of type null when script has run successfully without any error in PHP7.4
Removed dependency to logger/logger
0.1.9.2 - Removed dependency to `logger/logger`