Skip to content

Fixed PHP 8.3+ Deprecation: Modernize Assertion Handler

Choose a tag to compare

@rkrx rkrx released this 23 Nov 21:28
· 1 commit to master since this release

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.