-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PECL extension support and introduce newly refined main class "Aspect" #214
Commits on Jul 6, 2024
-
PECL: Add Aspect, PeclDispatcher classes and related test
This commit adds two new classes, Aspect and PeclDispatcher for handling aspect-oriented operations. These classes function as part of an aspect-oriented programming (AOP) framework that intercepts method calls. Corresponding tests are included to verify the successful weaving of aspects and method interception.
Configuration menu - View commit details
-
Copy full SHA for 61613c1 - Browse repository at this point
Copy the full SHA 61613c1View commit details -
Add MethodInterceptorInterface
This commit introduces the MethodInterceptorInterface. The interface defines the contract for method interceptors in the Ray.Aop framework. It includes an 'intercept' method which is invoked when an intercepted method is called.
Configuration menu - View commit details
-
Copy full SHA for 7e7a26f - Browse repository at this point
Copy the full SHA 7e7a26fView commit details -
Add specification document for the Aspect class
The new specification document details the functionality of the Aspect class used in Aspect Oriented Programming (AOP). It includes description of the class definition, constructors, public methods as well as use cases and crucial notes. This document will serve as a useful reference for developers working with AOP.
Configuration menu - View commit details
-
Copy full SHA for d0cc366 - Browse repository at this point
Copy the full SHA d0cc366View commit details -
Update Weaver and Aspect classes, add tests
The Weaver class has been updated to check for existence of instance bindings and compile new classes. The Aspect class no longer checks for the 'ray_aop' extension and now creates bindings directly in the newInstance method. The test suite has been expanded to include tests for instance creation and binding behaviors in Weaver and Aspect classes.
Configuration menu - View commit details
-
Copy full SHA for ee4fb17 - Browse repository at this point
Copy the full SHA ee4fb17View commit details -
Update PeclDispatcher interface
The PeclDispatcher class's interface was updated from InterceptHandlerInterface to MethodInterceptorInterface. This update aligns the PeclDispatcher with the new structure and functionality proposed by the MethodInterceptorInterface.
Configuration menu - View commit details
-
Copy full SHA for 010dd03 - Browse repository at this point
Copy the full SHA 010dd03View commit details -
Refactor Aspect class and update tests
Revised how the Aspect class functions by separating class instantiation into two different private methods, based on finality and extension availability. The main constructor has been updated. For instance, the classDir member has been replaced with tmpDir, which defaults to system temp dire if not explicitly set. Some throw instructions were also inserted regarding extension requirements. The unit tests have been adapted to reflect these changes.
Configuration menu - View commit details
-
Copy full SHA for 213f32e - Browse repository at this point
Copy the full SHA 213f32eView commit details -
Update README with new Aspect usage and interceptor details
The README file is updated to reflect changes in the usage of the `Aspect` class for configuration. The revised examples present how to use `Aspect` for different scenarios. Additionally, more detailed explanations are provided on how interceptors work, including the order of execution and how to access various elements from the `MethodInvocation` object. The changes also include explanations of how to deal with annotations and PHP8 attributes.
Configuration menu - View commit details
-
Copy full SHA for 754d13c - Browse repository at this point
Copy the full SHA 754d13cView commit details -
Update README.md with a clearer explanation and add link
Refined the explanation about interceptors for better clarity in README.md. Specifically, updated the description of `invocation->proceed()` and its process. Also, added a hyperlink to the PECL extension for more comprehensive user understanding.
Configuration menu - View commit details
-
Copy full SHA for 32d6b03 - Browse repository at this point
Copy the full SHA 32d6b03View commit details -
Refactor README.ja.md for clarity and conciseness
Significantly edited README.ja.md to make it more readable and user-friendly. This includes restructuring, removing duplicated or unnecessary content, adding helpful explanations, and improving the formatting for better readability. Made adjustments to the code snippets and annotations for the better understanding of the user.
Configuration menu - View commit details
-
Copy full SHA for 60abc0a - Browse repository at this point
Copy the full SHA 60abc0aView commit details -
Update code to improve psalm compatibility
This commit includes several updates aiming to improve the compatibility with psalm-static analysis. Major updates include suppressing some psalm assertions producing false-positives, adding additional type checks and assertions, and refining the PHPDoc annotations for better type inference. Tests have also been adjusted accordingly.
Configuration menu - View commit details
-
Copy full SHA for 79d785e - Browse repository at this point
Copy the full SHA 79d785eView commit details -
Soothe phpstan: Remove argument validation from PeclDispatcher
The type hinting in the intercept method of the PeclDispatcher already ensures that the arguments are the correct type. Removing the explicit checks for is_object, is_string, and is_array simplifies the code. Additionally, a variable type declaration has been added to AspectTest in the test module. A new directory tests/AspectFake is also excluded from phpstan checks.
Configuration menu - View commit details
-
Copy full SHA for 52f6420 - Browse repository at this point
Copy the full SHA 52f6420View commit details -
Soothe phpstan: Remove argument validation from PeclDispatcher
The type hinting in the intercept method of the PeclDispatcher already ensures that the arguments are the correct type. Removing the explicit checks for is_object, is_string, and is_array simplifies the code. Additionally, a variable type declaration has been added to AspectTest in the test module. A new directory tests/AspectFake is also excluded from phpstan checks.
Configuration menu - View commit details
-
Copy full SHA for d4a5849 - Browse repository at this point
Copy the full SHA d4a5849View commit details -
Add method_intercept function for mock testing
This commit introduces a new function, method_intercept, to the mock testing suite. The function takes a class, method, parameter array and object as parameters. It instantiates an instance of the passed class before calling its intercept method with the given parameters.
Configuration menu - View commit details
-
Copy full SHA for 931072b - Browse repository at this point
Copy the full SHA 931072bView commit details -
Move MethodInterceptorInterface to src-mock directory
The MethodInterceptorInterface file has been relocated to the src-mock directory. Amendments were made in the composer.json to reflect this change and the references in the PeclDispatcher file were updated accordingly. This restructuring ensures better organization and clarity in the codebase.
Configuration menu - View commit details
-
Copy full SHA for 9f183d5 - Browse repository at this point
Copy the full SHA 9f183d5View commit details -
Update annotation format in AspectTest
The annotation for 'runInSeparateProcess' has been corrected in AspectTest.php. The isolated process description remains the same, explaining it is required to avoid side effects from the aspect weaved classes.
Configuration menu - View commit details
-
Copy full SHA for e586673 - Browse repository at this point
Copy the full SHA e586673View commit details -
The logo has been included in the README.md file. This gives better visual representation and helps with branding for the project. It gets displayed at the top of the README file, improving the overall aesthetics.
Configuration menu - View commit details
-
Copy full SHA for 1d04a5f - Browse repository at this point
Copy the full SHA 1d04a5fView commit details
Commits on Jul 7, 2024
-
Move PeclDispatcher to src-php8 directory
The PeclDispatcher file was deleted from the src directory and a similar file was added to the src-php8 directory. The main difference in the added file is the use of Ray\Aop\Exception\LogicException, replacing the generic LogicException.
Configuration menu - View commit details
-
Copy full SHA for cec1481 - Browse repository at this point
Copy the full SHA cec1481View commit details -
Refactor AspectTest and remove PHP 8.1 requirement
The AspectTest class has been refactored to change the running order of the tests and revises their contents. The requirement for PHP 8.1 has been removed to increase compatibility. The isolated process notice and @runInSeparateProcess annotation have also been removed as they are no longer necessary.
Configuration menu - View commit details
-
Copy full SHA for 01d8b8e - Browse repository at this point
Copy the full SHA 01d8b8eView commit details -
Add composer-require-checker.json file
This commit introduces a new composer-require-checker.json file. This file defines a whitelist of symbols that will not be checked for dependencies in our codebase. This includes basic types like null, bool, string, int, float, and few more, as well as 'method_intercept' and 'Ray\\Aop\\MethodInterceptorInterface'.
Configuration menu - View commit details
-
Copy full SHA for 1d64791 - Browse repository at this point
Copy the full SHA 1d64791View commit details -
This commit introduces a new LogicException class. It extends the base \LogicException class and resides within the Ray\Aop\Exception namespace.
Configuration menu - View commit details
-
Copy full SHA for c9702d8 - Browse repository at this point
Copy the full SHA c9702d8View commit details -
Refactor method_intercept function in Mock
This commit simplifies the method_intercept function in the src-mock. The function parameters have been modified for efficiency, removing the object instantiation in favor of directly passing the MethodInterceptorInterface object.
Configuration menu - View commit details
-
Copy full SHA for 9d7dd23 - Browse repository at this point
Copy the full SHA 9d7dd23View commit details -
Configuration menu - View commit details
-
Copy full SHA for b0bb9ad - Browse repository at this point
Copy the full SHA b0bb9adView commit details -
Add continuous integration workflow for PECL extension
This commit introduces a new GitHub Actions continuous integration workflow specifically for the Ray.Aop PECL extension. The workflow builds the extension, runs PHPUnit tests, checks for memory leaks with Valgrind, and performs various other checks across multiple PHP versions. The failed steps details are uploaded as artifacts for easier troubleshooting.
Configuration menu - View commit details
-
Copy full SHA for 0bcea46 - Browse repository at this point
Copy the full SHA 0bcea46View commit details -
Update PECL extension use in README files
The PECL extension code usage examples in both the English and Japanese README files have been updated to be more descriptive. Furthermore, detailed installation instructions for the PECL extension, including the requirement of PHP 8.1 or higher, have been added.
Configuration menu - View commit details
-
Copy full SHA for bbb90c7 - Browse repository at this point
Copy the full SHA bbb90c7View commit details -
Soothe SA: Add MethodInterceptorInterface usage in Aspect
The code has been updated to import and assert the use of MethodInterceptorInterface on the dispatcher in Aspect.php. This ensures that the dispatcher instance conforms to the expected interface. It also introduces the use of array_keys to more effectively handle methods.
Configuration menu - View commit details
-
Copy full SHA for 4fbd354 - Browse repository at this point
Copy the full SHA 4fbd354View commit details -
Add namespace to MethodInterceptorInterface
The namespace Ray\Aop was added to MethodInterceptorInterface.php for further class organization and better handling. This change will assist in specifying the full path of the interfaced class within directory structures.
Configuration menu - View commit details
-
Copy full SHA for e17771f - Browse repository at this point
Copy the full SHA e17771fView commit details -
Add namespace to method_intercept.php and remove unused use statement
The namespace Ray\Aop was added to the method_intercept.php file to align it with the rest of the project's structure. Additionally, an unused use statement referencing MethodInterceptorInterface was removed from Aspect.php to clean up the code.
Configuration menu - View commit details
-
Copy full SHA for b485b95 - Browse repository at this point
Copy the full SHA b485b95View commit details -
Mark 'method_intercept' function for PHPStan and Psalm to ignore
The 'method_intercept' function which is a PECL-created function is updated to be ignored by PHPStan and Psalm. This change addresses static analysis warnings from these tools, ensuring that they do not flag this part of the code. The update will bring more clarity to issues identified during codebase analysis.
Configuration menu - View commit details
-
Copy full SHA for d844ceb - Browse repository at this point
Copy the full SHA d844cebView commit details