Bug Fixes and Enhancements
-
Improved Method Interception and Execution Depth Management
- Refined logic in
rayaop.c
for managing execution depth and interception state. - Enhanced error handling with new error codes:
RAYAOP_E_NULL_POINTER
RAYAOP_E_INVALID_STATE
- Streamlined parameter preparation and resource management in
rayaop_execute_ex
. - Removed debug print statements for cleaner output during execution.
- Refined logic in
-
Updated API and Function Signatures
- Modified function signatures to accept
class_name
,method_name
, andinterceptor
object. - Ensured proper initialization of global variables and alignment of return types with
zend_bool
.
- Modified function signatures to accept
-
Enhanced Test Coverage
- Added new tests to cover void return methods (
tests/010-rayaop-void-return.phpt
). - Updated existing tests for basic interception and thread safety:
tests/001-rayaop-basic.phpt
tests/008-rayaop-thread-safety.phpt
- Added new tests to cover void return methods (
-
Documentation Improvements
- Updated
README.md
andREADME.ja.md
with:- Detailed API references.
- Error handling guidelines.
- Debug mode instructions.
- Performance considerations.
- Known limitations.
- Added acknowledgments and clarified design decisions.
- Updated
-
Demo and Workflow Enhancements
- Introduced a new
demo
directory with sample code demonstrating AOP functionality. - Added
composer.json
for dependency management in the demo. - Updated GitHub Actions workflow (
.github/workflows/build.yml
):- Included testing of the demo directory.
- Added support for PHP 8.4.
- Introduced a new
-
Build Script Updates
- Modified
build.sh
:- Added compiler flags for debugging (
CFLAGS="-g -O0"
). - Introduced new functions
demo
anddebug
for running the demo and debugging.
- Added compiler flags for debugging (
- Modified
These changes enhance the reliability, efficiency, and documentation of the Ray AOP extension, providing a solid foundation for aspect-oriented programming in PHP.